ubuntu16開啓root賬號登錄

開啓root賬戶登錄


ubuntu16桌面版默認不開啓root賬戶登錄,按照以下步驟設置:

  1. sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

    在末尾添加:

    greeter-show-manual-login=true

  2. 保存修改後,sudo passwd root設置root用戶密碼,重啓即可

登錄root賬戶時報錯:mesg:ttyname failed:Inappropriate ioctl for device


這是讀取/root/.profile時發現錯誤:對設備不適當的ioctl操作,有兩種方法解決:

  1. /root/.profile文件中的mesg n替換成

    tty -s && mesg n

    重啓

  2. 將非root賬戶目錄中的.profile複製到/root/,例如:

    cp /home/username/.profile /root/

    重啓

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章