[linux-elitists] Per-user network up and down scripts

Teh Entar-Nick nick@teh.entar.net
Sat Dec 6 07:41:01 PST 2008


Don Marti:
> Is there a way to list all members of a group that will work whether
> the group is in /etc/group or on LDAP or some other directory server?

	getent group <groupname>

getent(1) will call the relevant getpw* and getgr* library functions, so
it sees whatever PAM shows it, rather than just one datastore.  Also
saves you having to poke into the nss configs to see which database
takes precedence.

"getent passwd" is likewise useful.

-- 
How do you get mailings?... from the lists             Nick Moffitt
1. suspects                                           nick@zork.net
2. elbows
                -- Don Saklad


More information about the linux-elitists mailing list