码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu server root用户自动登录

时间:2021-05-24 09:22:34      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:-o   star   emd   nts   image   targe   com   ubuntu   http   

添加启动的账户名

sudo vi /etc/systemd/system/getty.target.wants/getty@tty1.service

技术图片

如图中的 ExecStart=-/sbin/agetty -o ‘-p -- \\u‘ --noclear %I $TERM   中添加自启动root用户 -a root

 

设置免密码登陆:

sudo vim /etc/passwd

技术图片

将图中的 root:x:0:0:root:/root:/bin/bash 去掉x改为 root::0:0:root:/root:/bin/bash

 

最后重启测试

ubuntu server root用户自动登录

标签:-o   star   emd   nts   image   targe   com   ubuntu   http   

原文地址:https://www.cnblogs.com/tyche116/p/14768557.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!