Comment 22 for bug 286529

Revision history for this message
Savvas Radevic (medigeek) wrote : Re: [Bug 286529] Re: Should not be able to restrict first user

Ah, thanks - I tested #203 locally - it works, thanks!

> pwd.getpwuid(os.getuid())[0], but that returned 'root' as user...

I know, that's why I suggested using getlogin. :)

The other way to get this is to use:

from os import getenv
getenv("LOGNAME")
getenv("SUDO_USER")