Operating System - HP-UX
1752753 Members
4536 Online
108789 Solutions
New Discussion юеВ

Re: How To Determine What Netgroups A User Belongs To

 
robs58
Occasional Advisor

How To Determine What Netgroups A User Belongs To

In an NIS environment, what command given at the CLI will allow me to view/determine any/all netgroups that a user belongs to?

I am running HP-UX ver. 11.11 in a large NIS environment.

Note: I heard that the following command would provide the names of any/all netgroup that user "smith" belongs to. Unfortunately, it did not work. All helpful comments are
welcomed and appreciated.

# ypmatch 'smith.*' netgroup.byuser
ypmatch: can't match smith.*.
Reason: no such key in map


Thanks ahead of time!

Roger Clem
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: How To Determine What Netgroups A User Belongs To

Shalom Roger,

how about an OS command.

id

That worked for me on NIS slaves.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nido
Trusted Contributor

Re: How To Determine What Netgroups A User Belongs To

Hi,

#ypwhich
ypwhich will return name of NIS server

#ypwhich -m
-m : will return available maps on NIS.

#ypwhich -m |grep -i netgroup


And your answer:

#ypcat -k netgroup |grep -i

Please find some documentation in docs.hp.com for more information on NIS.

Cheers!!
" Let Villagers Be Happy!! "
robs58
Occasional Advisor

Re: How To Determine What Netgroups A User Belongs To

Thanks for your help guys!

Nido: Your answer was especially helpful!

All the best,

Roger Clem