您的位置:首页 > 其它

[置顶] 虚拟机中ubuntu使用root账户登录

2018-03-28 23:12 337 查看

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


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

欢迎关注我的blog:https://finen.top/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: