[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: id bug
Re: id bug
Mon, 11 Dec 2006 11:48:21 +0200
These commands are launched just after the adding my current user 'ostap' to
the 'root' & 'cvs' groups. So I have noticed 2 unconjectured things:
1. If I add me (user 'ostap') to some groups, it is not very convenient to
logout & login every time. As far as I can see, this is a kernel restriction
or mistake. But this is still very unconjectured & inconvenient.
2. As to the 'id' utility: is this normal that it shows only 2 groups for the
current process (which is still under the 'ostap' user) and 4 groups if the
user name is given. Taking into account previous note, the behaviour of 'id'
becomes clear but still very unconjectured.
Saturday 09 December 2006 06:06, Bob Proulx you wrote:
> Ostap Kutsyy wrote:
> > address@hidden ~]$ whoami
> > ostap
> Your current user name associated with your current process effective
> uiser id is ostap. Looks okay to me.
> > address@hidden ~]$ id ostap
> > uid=504(ostap) gid=504(ostap) groups=504(ostap),0(root),6(disk),501(cvs)
> Lists the user and groups of the 'ostap' 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.
> > address@hidden ~]$ id
> > uid=504(ostap) gid=504(ostap) groups=501(cvs),504(ostap)
> Did you recently add 'ostap' to the 'root' and 'disk' groups? Have
> you logged in since then?
> > address@hidden ~]$ id -un
> > ostap
> Basically the same as 'whoami'. Looks okay to me.
> > address@hidden ~]$ id -Gn
> > ostap cvs
> Again the group information. Looks okay to me.
> > address@hidden ~]$ id -Gn ostap
> > ostap root disk cvs
> Lists the groups of the 'ostap' 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.
> As noted in the documentation for id:
> `id' prints information about the given user, or the process running
> it if no user is specified.
> The command prints *either* the specified user *or* the current
> process. Those may be different.
> The kernel only places the user in the groups when the process is
> launched at login time, usually through PAM. You need to log in to
> get 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.
Ostap Kutsyy <address@hidden>, Hsphere Unix Developer,
Positive Software Corporation <http://www.psoft.net>,
a Comodo Group Company <http://www.comodogroup.com>
- id bug, Ostap Kutsyy, 2006/12/08
- Re: id bug, Bob Proulx, 2006/12/08
- Re: id bug,
Ostap Kutsyy <=