- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to list users groups
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2002 01:58 AM
тАО09-30-2002 01:58 AM
Does anyone know of a quick and easy way to list a user's primary and secondary groups (equivalent to the lsuser command on AIX)
Any Help Appreciated
Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2002 02:00 AM
тАО09-30-2002 02:00 AM
Re: How to list users groups
Give this command
#id
regards,
U.Sivakumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2002 02:05 AM
тАО09-30-2002 02:05 AM
Re: How to list users groups
id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2002 02:11 AM
тАО09-30-2002 02:11 AM
Solution> do
> echo "user: $i ";id $i
> done
user: root
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),
(lp),20(users)
user: daemon
uid=1(daemon) gid=5(daemon)
user: bin
uid=2(bin) gid=2(bin)
user: sys
uid=3(sys) gid=3(sys)
user: adm
uid=4(adm) gid=4(adm)
user: uucp
uid=5(uucp) gid=3(sys)
user: lp
uid=9(lp) gid=7(lp)
user: nuucp
uid=11(nuucp) gid=11(nuucp)
user: hpdb
uid=27(hpdb) gid=1(other)
user: nobody
uid=4294967294(nobody) gid=4294967294(nogroup)
user: www
uid=30(www) gid=1(other)
user: javier
uid=101(javier) gid=0(root)
user: jgil
uid=102(jgil) gid=20(users)
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2002 02:14 AM
тАО09-30-2002 02:14 AM
Re: How to list users groups
id -gn
will list the primary group
wheras
id -Gn
will list all the groups that account belongs to
You may easily put these commands in a small script that parses each entry from your passwd