Ubuntu设置root登录

1.设置root密码

sudo passwd root

先输入当前所在用户密码,然后输入你要设置的root密码,输入两次即可!
2. 允许手动输入用户密码,打开配置文件,命令如下:

vi /etc/lightdm/lightdm.conf

3.在最后一行添加

greeter-show-manual-login=true    #手工输入登陆系统的用户名和密码 
allow-guest=false                 #不允许guest登录

4.用root用户在图形界面登录会有错误,读取/root/.profile时发生错误解决办法

gedit /root/.profile

将文件末尾一句 mesg n 修改为:tty -s && mesg n

你可能感兴趣的:(Linux)