[Newbies] 为什么我在命令行里不能登陆root用户
Tofloor
poster avatar
笑笑天
deepin
2023-06-20 07:21
Author

root密码正确的,使用root登陆却提示密码错误。是为何呢

Reply Favorite View the author
All Replies
落日
deepin
2023-06-20 07:22
#1

你设置了root密码吗?sudo passwd root

Reply View the author
W2J
deepin
2023-06-20 07:56
#2

用 sudo -i 即可,root用户如今是个名义上的超级管理员。

Reply View the author
jjcui8595
deepin
2023-06-20 14:08
#3

sudo su切换到root

Reply View the author
观摩
deepin
2023-06-20 16:51
#4
W2J

用 sudo -i 即可,root用户如今是个名义上的超级管理员。

对 sudo -i 就行了,没必要直接root登录

Reply View the author
阿尼樱奈奈
deepin
2023-06-20 17:14
#5

sudo passwd root 给root用户设置密码。

不过建议命令开头如果需要管理员权限,直接开头加 sudo 就可以了。

Reply View the author
donaldsebleung
deepin
2023-06-20 18:11
#6

强烈不建议直接登录 root 账号

如楼上所说,需要 root 权限应该用 sudo 提权,倘若需要同时以 root 权限执行多个命令,可运行 sudo -i 取得 root shell,完事后 exit 离开

root 账号本身则强烈建议锁定禁止登录,增加系统安全性:

sudo passwd -l root
Reply View the author