Do seu comentário sobre a outra resposta:
When I do
su - otheruser, I am gettingNo directory, logging in with HOME=/. Then when I runwhoami, I getroot.
Isso acontece porque 'otheruser' não tem um shell (como o bash). Provavelmente é algo como / bin / false. Se você quer um shell como 'otheruser', use isto:
sudo -u otheruser /bin/bash