问题
xp@ubuntu:~/work/code/f-stack/f-stack/lib$ sudo su
Cannot execute /bin/bash/: Not a directory
解决方法
sudo vim /etc/passwd
把root:x:0:0:root:/root:/bin/bash/
改成root:x:0:0:root:/root:/bin/bash
修复sudo su到root无法执行问题
本文介绍了一个关于使用sudo su切换到root用户时遇到的问题:无法执行/bin/bash,错误提示为“Not a directory”。文章提供了具体的解决步骤,通过编辑/etc/passwd文件将root用户的shell更正为正确的/bin/bash路径。
问题
xp@ubuntu:~/work/code/f-stack/f-stack/lib$ sudo su
Cannot execute /bin/bash/: Not a directory
解决方法
sudo vim /etc/passwd
把root:x:0:0:root:/root:/bin/bash/
改成root:x:0:0:root:/root:/bin/bash
1万+
1962
4680
1672

被折叠的 条评论
为什么被折叠?