
人們可以:
sudo chsh -s /bin/sh
或者
sudo chsh -s /bin/sh user_name
據了解,第二個指令更改了指定的shell使用者名稱但不清楚如果不指定會發生什麼使用者名稱這反映在哪裡?
謝謝你!
答案1
沒有使用者的命令更改 root 使用者:
terrance@terrance-ubuntu:~$ sudo chsh -s /bin/sh
terrance@terrance-ubuntu:~$ cat /etc/passwd | grep "/bin/sh"
root:x:0:0:root:/root:/bin/sh
terrance@terrance-ubuntu:~$ sudo chsh -s /bin/bash
terrance@terrance-ubuntu:~$ cat /etc/passwd | grep "/bin/bash"
root:x:0:0:root:/root:/bin/bash