话说用户被移出sudoers组后有没有完美的解决办法
Tofloor
poster avatar
trekkie
deepin
2017-03-02 22:29
Author
昨天安装了VirtualBox,想把用户添加进vboxusers 用户组,用了sudo usermod -G XXX vboxusers,这个命令不是添加是移动!!结果就是当前用户被移出了sudoers组,用不了sudo了,网上搜的方法都是su切换到root,要么用LiveCD挂盘修改,但是Deepin好像没有激活root,也没有LiveCD,请问还有其他方法没有啊?
Reply Favorite View the author
All Replies
avatar
MattD
deepin
2017-03-02 22:50
#1
可是,Deepin里面根本就没有sudoers这个组,只有sudo。而且用户的sudo权限是通过修改sudoer文件来实现的,我自己的用户也没加sudo组。
Reply View the author
avatar
trekkie
deepin
2017-03-03 01:47
#2
https://bbs.deepin.org/user/15801 出现“用户不在sudoers文件中,此事将被报告”是什么原因造成的?
Reply View the author
avatar
南浦月
deepin
2017-03-03 03:39
#3
https://bbs.deepin.org/post/135412
@MattD 出现“用户不在sudoers文件中,此事将被报告”是什么原因造成的?

如果你没有修改过其他设置,先切换到 root 用户,运行下面的命令后注销并重新登录:
  1. gpasswd -a sudo
Copy the Code

把 替换成需要加 sudo 权限的用户名。
Reply View the author
avatar
iceyer
deepin
2017-03-03 04:07
#4
https://bbs.deepin.org/post/135412
如果你没有修改过其他设置,先切换到 root 用户,运行下面的命令后注销并重新登录:

把  替换成需要加 s ...

没用的,默认没有root用户。进live修复吧。
Reply View the author
avatar
iceyer
deepin
2017-03-03 04:08
#5
-G要和-a一起使用才是追加啊
Reply View the author
avatar
南浦月
deepin
2017-03-03 04:16
#6
https://bbs.deepin.org/post/135412
没用的,默认没有root用户。进live修复吧。

也可以用其他有 sudo 权限的用户来运行~
Reply View the author
avatar
MattD
deepin
2017-03-03 04:21
#7
https://bbs.deepin.org/post/135412
没用的,默认没有root用户。进live修复吧。

不用进Live啊……跟忘记root密码一样的方法,init=/bin/bash,mount -o rw,remount /,然后操作就行了。







    来自:Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0  (zh-CN)
    ——2017/3/2 下午8:21:00
    Reply View the author
    Comments
    Iceyer
    2017-03-03 04:23
    恩,这样更简单一些。不过一直觉得这东西能算是后门啦。。。
    avatar
    iceyer
    deepin
    2017-03-03 04:21
    #8
    https://bbs.deepin.org/post/135412
    也可以用其他有 sudo 权限的用户来运行~

    我猜lz没有建其他用户...
    Reply View the author
    avatar
    南浦月
    deepin
    2017-03-03 07:16
    #9
    https://bbs.deepin.org/post/135412
    我猜lz没有建其他用户...

    ……
    紫薯布丁
    Reply View the author
    avatar
    qingxp9
    deepin
    2017-03-03 08:31
    #10
    在grub进单用户模式 ,然后改就ok
    Reply View the author
    avatar
    trekkie
    deepin
    2017-03-03 21:16
    #11
    https://bbs.deepin.org/post/135412
    我猜lz没有建其他用户...

    确实没有
    Reply View the author