Get LOGNAME from environment instead of os.getlogin()