[Xorp-users] user group problem to run xorpsh
Justin Walker
justin@mac.com
Tue, 30 Nov 2004 08:51:27 -0800
On Nov 30, 2004, at 3:16, Mark Handley wrote:
[snip]
> I did some testing, and it appears that Linux has an interesting
> quirk when it comes to groups. If you list the user as being in a
> group by listing them in /etc/group, then getgrnam will say the user
> is in a group. If you set the group as the user's default group in
> /etc/passwd, then getgrnam will not list the user as being in the
> group. And we currently use getgrnam to find out who is in the xorp
> group.
>
> So the simple workaround is to explicitly add xorpuser to the xorp
> group in /etc/group
FWIW, I believe that It Has Always Been Thus. The man page for
getgrnam() and friends specifically sez (at least on Mac OS X/Darwin)
that the routines deal with /etc/group. Poking around in the ashes of
the long ago, I believe that even back to version 5, it was assumed
that /etc/passwd was "in sync" with /etc/group (i.e., passwd listed a
single group id, and /etc/group listed the group id's, together with
each id's list of users [as names]).
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Men are from Earth.
| Women are from Earth.
| Deal with it.
*--------------------------------------*-------------------------------*