Ubuntu 16.04(cat /etc/issue或者sudo lsb_release -a)默认是不允许root登录的,在登录窗口只能看到普通用户和访客登录。以普通身份登陆Ubuntu后我们需要做一些修改,普通用户登录后,修改系统配置文件需要切换到超级用户模式,在终端窗口里面输入: sudo -s.然后输入普通用户登陆的密码,回车即可进入 root用户权限模式。
然后执行:gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
作如下修改:
然后执行:sudo passwd root 设置root密码。
Error found when loading /root/.profile: stdin:is not a tty As result the session will not be configured correctly. You should fix the problem as soon as feasible.执行 gedit /root/.profile 作如下修改: