本篇文章中重点为大家讲解一下Linux中配置Ubuntu 配置单root用户登录具体方法,有需要的小伙伴可以参考一下。

sudo vim usr/share/lightdm.conf.d/50-ubuntu.conf //编辑器不限
[SeatDefaults]
user-session=ubuntu
greeter-show-manual-login=true #手工输入登录系统的账号密码
allow-guest=false #禁止guest登录sudo passwd rootsudo vim /root/.profile //root首次登录会报错解决方法
# ~/.profile: executed by Bourne-compatible login shells.if [ "$BASH" ]; thenif [ -f ~/.bashrc ]; then
. ~/.bashrc
fifi#mesg n 注释掉mesg n 增加一行tty -s && mesg n
tty -s && mesg nsudo vim /etc/ssh/sshd_config
#permitRootLogin without-password 注释掉这行,新增下面一行
permitRootLogin yes重启ssh服务即可
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。