id python3 << EOF import getpass; getpass.getuser() EOF ls -l $HOME
Standard input is empty
uid=20095 gid=1000 groups=1000 total 4 -rw-rw-r-- 1 root root 70 Jul 23 15:30 prog.sh
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.5/getpass.py", line 170, in getuser return pwd.getpwuid(os.getuid())[0] KeyError: 'getpwuid(): uid not found: 20095'