Linux wykonuje jako użytkownik

sudo -H -u otheruser bash -c 'echo "I am $USER, with uid $UID"' 
feddynventor