Re: group members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 21, 2007 at 04:56:33PM +0000, Mike -- EMAIL IGNORED wrote:
> On Thu, 20 Sep 2007 22:33:29 -0500, Mikkel L. Ellertson wrote:
> 
> > Mike -- EMAIL IGNORED wrote:
> >>>From a konsole, how can I determine
> >> all the members of a group?
> >> Thanks,
> >> Mike.
> >> 
> > One way is to rung something like "grep <group name> /etc/group". But
> > you can run into problems if the group name is also a user name, or is
> > part of a larger group name.
> > 
> > Mikkel
> [...]
> 
> How about:
>    grep ^<groupName>: /etc/group
> ?
> Mike.

That should work fine if your groups are all defined in /etc/group.  It
won't get you an answer if you're using NIS, LDAP, or some other naming
service.  The "getent" tool calls the same functions that applications
do, so it works no matter what the system's configured to use:
  getent group [groupname]

HTH,

Nalin


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux