Kamus_cu 发表于 2007-03-15 20:41

EUID和UID的区别?

EUID和UID,whoami who am i
的关系是什么?

briangao 发表于 2007-03-15 21:15

UID (shown by /usr/ucb/whoami) and EUID -- effective UID (shown by who am i or id ) areinitially the same whenyou login to the system. When you su or run a setuid program, your EUID is changed.

For example:
You logged in as user susan(UID 517) and you su - bob (bob's UID is 900). Now your UID is 517 but EUID is 900

Same applies when you run a setuid program. Let's say you logged in as susan(UID 517) and you run a setuid program which is owned by root(UID 0). When you are executing the program, your UID is still 517 but EUID is 0.

Hope this helps

atu82 发表于 2007-04-17 22:47

thanks

egg2003 发表于 2013-09-25 12:01

第一句就写反了 whoami是显示euid

回复 2# briangao


   
页: [1]
查看完整版本: EUID和UID的区别?