Ubuntu 14.04 root使用者自動登入
阿新 • • 發佈:2019-01-09
1、設定root密碼
sudo -s
sudo passwd root
2、如果lightdm.conf檔案存在
可編輯/etc/lightdm/目錄下的lightdm.conf檔案,如沒有此檔案,直接建立
[SeatDefaults]
autologin-user=root
user-session=ubuntu
greeter-show-manual-login=true
注意:如果有lightdm.conf就不需要步驟3了
3、如果lightdm.conf檔案不存在
在terminal下輸入
sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
內容如下:
[SeatDefaults]
autologin-user=root
user-session=ubuntu
greeter-show-manual-login=true
4、在terminal下輸入
gedit /root/.profile
將檔案末尾的 “mesg n”,修改為 “tty -s && mesg n”。
注意:如果這裡不修改,登入會提示如下資訊:
Error found when loading /root/.profile
stdin:is not a tty
5.用reboot命令重啟即可