The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
allowing members of a group to kill a process vastcharade High Level Programming 1 01-17-2008 04:55 PM
Monkcast #12: IBM HW group OEMs Solaris to chagrin of SW group & a ... - ZDNet.com bl iBot UNIX and Linux RSS News 0 08-17-2007 01:30 PM
make issue when I add some members into a NIS group on solaris 9,please help !! lk74612 SUN Solaris 4 11-17-2006 02:07 AM
listing members of a unix group ovaska UNIX for Dummies Questions & Answers 2 03-09-2005 02:54 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-22-2008
Registered User
 

Join Date: May 2008
Posts: 7
members in a group

Hi all,
I am new to Linux.Can anyone tell me how to display or list all the members in a group?


Thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 05-22-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 352
Look out for the following files:

/etc/passwd and /etc/group

Hope this helps!

nua7
Reply With Quote
  #3  
Old 05-22-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
one way, assume we want the group called prog:
Code:
grep '^prog' /etc/group
Reply With Quote
  #4  
Old 05-22-2008
Registered User
 

Join Date: Mar 2008
Posts: 10
Use the command:
# groups

Rgs,
Oktawik
Reply With Quote
  #5  
Old 05-22-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 352
groups will simply list out the groups avalaible on the system. It won't give you the members associated with them.

Grepping on /etc/group with the desired group name would do the trick.
Reply With Quote
  #6  
Old 05-22-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
On my Linux at least, groups era prints which groups I am a member of.
Reply With Quote
  #7  
Old 05-23-2008
Registered User
 

Join Date: May 2008
Posts: 7
Thank you all...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0