设置root密码用sudo passwd就可以(不需要知道原密码),不用在后面加root
执行:sudo su
设置root密码用sudo passwd就可以(不需要知道原密码),不用在后面加root
没用,显示work用户不是管理员组
意思是连sudo运行权限都没有(悲),试试以管理员权限在文件管理器打开文件夹,然后进入终端
想根治这个问题,建议百度,百度上这类问题的解决方案其实蛮多的
意思是连sudo运行权限都没有(悲),试试以管理员权限在文件管理器打开文件夹,然后进入终端
想根治这个问题,建议百度,百度上这类问题的解决方案其实蛮多的
没有root权限,无法修改/etc目录中的文件。用修复模式启动,也显示root用户被锁定,无法进入修复模式。
没有root权限,无法修改/etc目录中的文件。用修复模式启动,也显示root用户被锁定,无法进入修复模式。
去Live CD改root账户密码试试。
sudo su
如果是ok,应该是ok把root锁了
随便找一个linux的livecd 然后chroot进你的系统里,随后改root密码,把用户加入sudo组
推荐用archlinux
下面是一个archlinux的演示
(archlinux)#fdisk -l
找到你的系统盘,输出类似下面:
Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: WDC WDS240G2G0A-
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97B6BEC9-6F3E-4C61-9611-0197C28588CF
Device Start End Sectors Size Type
/dev/sda1 2048 616447 614400 300M EFI System
/dev/sda2 616448 3762175 3145728 1.5G Linux filesystem
/dev/sda3 3762176 20162559 16400384 7.8G Linux filesystem
/dev/sda4 20162560 172806143 152643584 72.8G Linux filesystem
/dev/sda5 172806144 468858879 296052736 141.2G Linux filesystem
假如你的系统盘是/dev/sdax
(archlinux)#mount /dev/sdax /mnt
(archlinux)#chroot /mnt
此时你将进入你的系统的shell
(your system)# passwd root
结束,此时你可以顺便把你的用户加入sudo组,或者过一会也行
(your system)# exit
此时回到archlinux的shell
(archlinux)#umount -v /mnt
(archlinux)#reboot
自己用U盘做一个UOS的安装盘,ctrl+alt+f4进入其liveCD模式,然后在liveCD模式里,进入文件管理器,进入你原来的系统盘(/分区),在系统盘里用终端更改root密码。
具体可以参考我之前更改root密码的步骤:
————————————
——————————
——————————
谢谢楼上两位大佬,按你们的办法,已解决了此问题。
Popular Ranking
ChangePopular Events
More
为安排程序要使用root权限,但现在被锁了。
如图,一是不知道root密码 ,安装时也没有设置密码。二是当前用户也不是root组 。怎么办?