Re: uid/guid
Il mar, 2002-05-14 alle 15:09, /dev/null ha scritto:
> $ su
> password:
> # id
> uid=0(root) gid=0(root) groups=0(root)
> # echo $USER
> root ### l'effective UID
> # echo $LOGNAME
> pippo ### il real UID
gpiero@cancan:~$ echo $USER; USER=root; echo $USER
gpiero
root
e' facile cambiare euid, senza nemmeno digitare password ;)... a parte
gli scherzi, $USER e $LOGNAME sono solo variabili di shell e non sono
quindi affidabili... in particolare, l'esempio che hai fatto, molto
chiaro, e' da intendersi solo come analogia del comportamento di un
programma setuid...
gpiero@cancan:~$ id -u; id -ru
1000
1000
gpiero@cancan:~$ su
Password:
cancan:/home/gpiero# id -u; id -ru
0
0
da info su:
`su' allows one user to temporarily become another user. It runs a
command (often an interactive shell) with the real and effective user
id, group id, and supplemental groups of a given USER.
Ciao,
Gian Piero.
--
To UNSUBSCRIBE, email to debian-italian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to:
- References:
- uid/guid
- From: walter valenti <walter@waltervalenti.it>
- Re: uid/guid
- From: Alessio Re <alessio.re@meteobiella.org>
- Re: uid/guid
- From: /dev/null <devnull@fastwebnet.it>