[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: id bug
From: |
Bob Proulx |
Subject: |
Re: id bug |
Date: |
Fri, 8 Dec 2006 21:06:51 -0700 |
User-agent: |
Mutt/1.5.9i |
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.
Bob
- id bug, Ostap Kutsyy, 2006/12/08
- Re: id bug,
Bob Proulx <=