如何进入 root 模式?
Tofloor
poster avatar
wbsheng
deepin
2016-12-12 21:47
Author
使用 su 会显示
  1. $ su
  2. 密码:
  3. su:鉴定故障
Copy the Code
然而使用 sudo su 会显示
  1. $ sudo su
  2. [sudo] xxx 的密码:
  3. xxx 不在 sudoers 文件中。此事将被报告。
Copy the Code
请问现在应该怎样进入 root?

Reply Favorite View the author
All Replies
avatar
fwq668
deepin
2016-12-12 22:10
#1
先执行sudo passwd root
设置好密码再输入su回车
然后输入你刚刚设置的密码就可以了。
Reply View the author
avatar
wbsheng
deepin
2016-12-12 22:16
#2
https://bbs.deepin.org/post/132980
先执行sudo passwd root
设置好密码再输入su回车
然后输入你刚刚设置的密码就可以了。 ...

问题是当前用户不在 sudoers 中,无法使用 sudo 命令。而我只有一个用户。
问题的原因是之前在 root 中用 visudo 命令把 sudo ALL=(ALL) ALL 行的注释去掉,退出来就这样进不去了。。。
Reply View the author
avatar
159******79
deepin
2016-12-12 23:25
#3
sudo su接着输入密码就好了
Reply View the author
avatar
fwq668
deepin
2016-12-14 00:06
#4
https://bbs.deepin.org/post/132980
问题是当前用户不在 sudoers 中,无法使用 sudo 命令。而我只有一个用户。
问题的原因是之前在 root 中用 ...

那你就把整个目录更改可读可写的权限,执行以下命令:chmod 777 /etc/sudoers
然后更改回来就可以使用sudo命令了。
Reply View the author