bug-coreutils
[Top][All Lists]
Advanced

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

Re: Weirdness in groups and id commans


From: Bob Proulx
Subject: Re: Weirdness in groups and id commans
Date: Thu, 2 Nov 2006 22:02:17 -0700
User-agent: Mutt/1.5.9i

Ismail Donmez wrote:
> Hi,
> 
> Using coreutils 6.4 ,
> 
> [~]> whoami
> cartman
> [~]> groups
> users disk wheel audio dialout video pnp removable power

Lists the access groups of the currently running process.

> [~]> groups cartman
> users disk wheel audio dialout video apache pnp removable power

Lists the access groups of the 'cartman' user if that user were to log
in at this moment.  Does not list the current process.  Does not list
past history of the process.  Does not list future possibilities.

> Notice that "apache" is in the second output, id shows similar behaviour,
> 
> [~]> id
> uid=1000(cartman) gid=100(users) groups=6(disk),10(wheel),18(audio),20
> (dialout),27(video),100(users),200(pnp),201(removable),204(power)
> [~]> id cartman
> uid=1000(cartman) gid=100(users) groups=100(users),6(disk),10(wheel),18
> (audio),20(dialout),27(video),80(apache),200(pnp),201(removable),204(power)
> 
> 
> Is this a bug or a feature?

Did you recently add 'cartman' to the 'apache' group?  Have you logged
in since then?

The kernel only places the user in the groups when the process is
configured at login time, usually through PAM.  You need to log in to
get the current settings.  Usually that means logging out but you
could 'ssh localhost' for example to spawn a login session through
ssh.

See the initgroups(2) and setgroups(2) man pages for more information.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]