Re: Getting the list of members in a group.



On Jun 20, 6:59 am, voipfc <voi...@xxxxxxxxxxxxxx> wrote:
This appears to be a simple question, but I have never gotten round to
find out due to webmin.

How do you list the members of group from the command line?

The simplest way would be to
cat /etc/group
and look at the fourth field

A bit more complex would be
grep 'groupname' /etc/group
and look at the fourth field

And, you could
awk -F : '$1 ~ /groupname/ { print $4}' /etc/group
and look at the output


.



Relevant Pages

  • Re: Getting the list of members in a group.
    ... The simplest way would be to ... cat /etc/group ... they don't give you all the members for a ... So I'm member of the group 'users' but I do not appear in the group file ...
    (comp.os.linux.setup)
  • Re: set of a set etc.
    ... >>> Your cat is a member of the set of your cat. ... >> same members, and indivduals do not have members, all indivduals are ... Quine discusses other possible solutions. ... If for the sake of smooth systematization we see fit to assign ...
    (sci.math)
  • Re: Adding a -D date option to `cat
    ... So, instead of adding 800 bytes to 'cat', we should create a new ... command with a new name, and increase the size of the base system ... singing and all-dancing command for filtering. ... port which I know that no one will ever use, ...
    (freebsd-current)
  • Re: GUI for access 2002
    ... 1.I execute a command button that loads the form with data from a members ...
    (microsoft.public.access.gettingstarted)
  • Re: Adding a D - Date option to cat
    ... My automated attrib program - written by a friend - as we both go ... `cat' program, but with ten extra lines added to it. ... the correct answer was to add some new command. ... FreeBSD, which were *copied* from other systems (they weren't even ...
    (freebsd-current)