Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command to list all users in a group

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
0
0
Hi all! Is there a command to list all users in a unix group?

Thanks.

 
I don't know of a command to list all users in a group.
The following should work:

grep groupname /etc/group

if you are using a group file.
 
Thank you jyoto. ..but not lot of users will have access to /etc/group file....right.

I thought there will be a command simillar to
groups <username> to find out which group a user belong to ....

 
As the user, the command 'id' will tell them which groups they belong to.

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
getent group

>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top