EUID和UID的区别?
EUID和UID,whoami who am i的关系是什么? 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 thanks 第一句就写反了 whoami是显示euid
回复 2# briangao
页:
[1]