1.开始使用 Ubuntu的时候,root用户是不能使用的,因为root没有被激活打开。所以需要激活打开。
2.激活,操作步骤:
# 使用当前用户 ubuntu登录
ubuntu@xxxxx:~$
#设置root的密码
sudo passwd root
# 输入密码
new password:xxxxx
# 再次输入密码
retype new passwrod:xxxx
# 切换root账号
su root
# 文件设置
vim /etc/ssh/sshd_config
# 添加以下内容
# 在#PermitRootLogin prohibit-password 下面添加两行:
PermitRootLogin yes
PasswordAuthentication yes
# 生效
service ssh restart
文章来源地址https://www.toymoban.com/news/detail-757915.html
3.就可以使用root登录。就完成了。
文章来源:https://www.toymoban.com/news/detail-757915.html
到了这里,关于Ubuntu 设置 root用户的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!