gui*_* 桂林 4 linux user-accounts shell ubuntu
我把root shell改成/bin/false 搞错了,但是当我想改回来的时候,总是报错
sudo chsh -s /bin/bash root
[sudo] password: <input current user password>
password: <input root password>
chsh: PAM: Authentication failure
Run Code Online (Sandbox Code Playgroud)
/etc/passwd
如果 chsh 不起作用,您可以通过替换该行来修改该文件
root:x:0:0:root:/root:/bin/false
Run Code Online (Sandbox Code Playgroud)
和
root:x:0:0:root:/root:/bin/bash
Run Code Online (Sandbox Code Playgroud)