我是root用户,但我没有其他用户的密码.
When I do su - otheruser,I am getting No directory,logging in with HOME=/. Then when I run whoami,I get root.
su - otheruser
No directory,logging in with HOME=/
whoami
root
这是因为’otheruser’没有shell(比如bash).它可能类似于/ bin / false.如果你想将shell作为’otheruser’,请改用:
sudo -u otheruser /bin/bash