開啓root賬戶登錄
ubuntu16桌面版默認不開啓root賬戶登錄,按照以下步驟設置:
sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
在末尾添加:
greeter-show-manual-login=true
保存修改後,
sudo passwd root
設置root用戶密碼,重啓即可
登錄root賬戶時報錯:mesg:ttyname failed:Inappropriate ioctl for device
這是讀取/root/.profile時發現錯誤:對設備不適當的ioctl操作,有兩種方法解決:
將
/root/.profile
文件中的mesg n
替換成tty -s && mesg n
重啓
將非root賬戶目錄中的
.profile
複製到/root/,例如:cp /home/username/.profile /root/
重啓