转:设置ubuntu 14.04 开机root用户登陆

 安装完成如需使用root身份登录,可打开终端输入以下命令:
#设置root密码
sudo passwd root
#切换到root用户
sudo -s

想要在登录界面使用root身份登录,可编辑/etcghtdm/目录下的lightdm.conf文件,如没有此文件,直接创建

vi /etcghtdmghtdm.conf

文件内容最终为:
[SeatDefaults]
#启动后以root身份自动登录
autologin-user=root
greeter-session=unity-greeter
user-session=ubuntu
#手工输入登陆系统的用户名和密码
greeter-show-manual-login=true
#禁用guest用户
allow-guest=false




发现开机出现以下提示:

Error found when loading /root/.profile

stdin:is not a tty

…………

打开文件 vi /root/.profile后找到“mesg n”,

将其更改为“tty -s && mesg n” 
原文地址:https://www.cnblogs.com/yaojinvip/p/6664147.html