求助!!!!!
Tofloor
poster avatar
a59742
deepin
2018-05-30 17:22
Author
昨天因为mysql文件夹无法访问,所以我执行了以下命令:
sudo usermod -G mysql deepin 但我忘记改回来了

然后今天就悲剧了:
deepin 不在 sudoers 文件中。此事将被报告。
我没设置过root密码,所以我好像也进不了root用户了,有没有其他办法可以解决的啊?求助!!!!!

Reply Favorite View the author
All Replies
avatar
gaoshou
deepin
2018-05-30 17:43
#1
进root ?sudo passwd root
Reply View the author
avatar
a59742
deepin
2018-05-30 17:46
#2
https://bbs.deepin.org/post/157267
进root ?sudo passwd root

不是,是我这个用户用不了sudo了,所以现在也没法设置root密码了
Reply View the author
avatar
gaoshou
deepin
2018-05-30 17:51
#3
进恢复模式看看
Reply View the author
avatar
a59742
deepin
2018-05-30 18:12
#4

你好,恢复模式下的东西保存不到本机啊,我试了几次都不行
Reply View the author
avatar
sinux
deepin
2018-05-30 18:27
#5
https://bbs.deepin.org/post/157267
你好,恢复模式下的东西保存不到本机啊,我试了几次都不行

你大概需要进grub,键入‘e’把恢复模式的只读修改为读写,引导系统之后,进root
Reply View the author
avatar
a59742
deepin
2018-05-30 18:36
#6
https://bbs.deepin.org/post/157267
你大概需要进grub,键入‘e’把恢复模式的只读修改为读写,引导系统之后,进root ...

求具体操作,不知道怎么弄
Reply View the author
avatar
sinux
deepin
2018-05-30 18:50
#7
重启机器,进入grub界面后,光标到恢复模式,摁e,进入编辑,里面有一行描述启动模式,改成rw,f10退出继续引导。会进入一个选单,选择root启动,现在你就有完整的root权限了。去干你想干的事。
Reply View the author
avatar
a59742
deepin
2018-05-30 19:09
#8
本帖最后由 a59742 于 2018-5-30 11:32 编辑
https://bbs.deepin.org/post/157267
重启机器,进入grub界面后,光标到恢复模式,摁e,进入编辑,里面有一行描述启动模式,改成rw,f10退出继续 ...

你好,试了还是不行,我把ro修改成rw之后按f10没有进入什么选单,而是直接进了恢复模式的系统,修改了还是没用,好像rw保存不了一样
Reply View the author
avatar
baikal
deepin
2018-05-30 19:36
#9
1、首先开机选择“Advanced options for *****”这一行按回车。
2、然后选中最后是“(recovery mode)”这一行按“E”进入编辑页面。
3、将“ro recovery ”改为“rw single init=/bin/bash”。
4、按ctrl+X或者F10启动,进入root shell。
5、进行相关修改操作。例如,如果有多个用户组,使用逗号隔开。
      usermod -G deepin,sudo,users deepin
6、修改完成后按ctrl + alt + del重启电脑。
Reply View the author
avatar
a59742
deepin
2018-05-30 20:10
#10
https://bbs.deepin.org/post/157267
1、首先开机选择“Advanced options for *****”这一行按回车。
2、然后选中最后是“(recovery mode)”这 ...

你好,没有包含recovery mode的这一行,只有两行一样的,都是deepin的系统名字和版本,其中一行是deepin2,一行是deepin3而已。。。
Reply View the author
avatar
baikal
deepin
2018-05-31 01:55
#11
哦~~方便的话可以拍照来看一下吗?
此外,第一步,你选择第一个选项也可以的,
只是在第二步时,需要搜索“ro  splash quiet”那一行进行修改,把ro替换为“rw single init=/bin/bash”。
后面操作流程 一样。
Reply View the author
avatar
a59742
deepin
2018-05-31 02:58
#12
本帖最后由 a59742 于 2018-5-31 00:04 编辑
https://bbs.deepin.org/post/157267
哦~~方便的话可以拍照来看一下吗?
此外,第一步,你选择第一个选项也可以的,
只是在第二步时,需要搜索 ...

终于解决了,是直接在grub那个文件里的ro quiet splash后面加上rw init=/bin/bash才能进入root的shell,谢谢你的回答
Reply View the author