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

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux