My problem: I have a Python program, and the user launch it using
sudo. Sometimes I have to get the user's home, and I can do this only knowing its name:
import pwd pwd.getpwnam(username)
So: how can I get the name of the user that launched the program?