当我输入我的控制台“runuser”时,我收到“未找到命令”.我虽然这个命令很标准,但我在我的系统上找不到它.
我是root用户,但我没有其他用户的密码.
解决方法
从你对其他答案的评论:
When I do
su - otheruser
,I am gettingNo directory,logging in with HOME=/
. Then when I runwhoami
,I getroot
.
这是因为’otheruser’没有shell(比如bash).它可能类似于/ bin / false.如果你想将shell作为’otheruser’,请改用:
sudo -u otheruser /bin/bash