The pythonic way equal to "whoami"

Nobody nobody at nowhere.com
Wed Jun 8 22:38:58 EDT 2011


On Wed, 08 Jun 2011 21:58:17 +0800, TheSaint wrote:

>> os.geteuid
> This return 0 for *root* . I don't know if it's a standard for all distro.

UID 0 is the "superuser". The name "root" is conventional, but it's the
EUID (effective UID) which is used in permission checks; the kernel
doesn't care about names.




More information about the Python-list mailing list