虚拟机中ubuntu系统使用root账户登录教程,ubunturoot


1.修改文件

sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

2.增加代码

greeter-session=unity-greeter
greeter-show-manual-login=true #手工输入登陆系统的用户名和密码
allow-guest=false   #不允许guest登录
autologin-user=root #Root用户登录
autologin-session=lightdm-autologin #设置自动登录界面

3.重启

reboot

重启后就会出现root登录界面,登录会报错所以需要修改文件~

4.修改文件

gedit /root/.profile

把:mesg n || true改为:tty -s && mesg n || true

5.更新root密码

passwd

更新的账号密码即可,记得下次不要忘记密码…

相关内容