请按以下操作:

1,在启动的时候,上下移动,选中(不是按回车)类似这样的修复模式"Ubuntu-x.x.xx.xx-generic (recovery mode),然后按e。

2,在第二层菜单选择有kernel这行,如:"kernel /boot/vmlinux-x.x.xx-xx-generic root=UUID=ae424e-bod0-475c-2342433 ro single" 按下e进行编辑。

3,修改启动参数,将后面的ro single改为rw single init=/bin/bash,然后按回车。

如:"kernel /boot/vmlinux-x.x.xx-xx-generic root=UUID=ae424e-bod0-475c-2342433 rw single init=/bin/bash"

4,按b启动系统就可以进入single模式而不需要密码了。

5,然后用passwd修改密码:具体命令是passwd 用户名。

相关文章:

  • 2021-12-15
  • 2021-12-20
  • 2021-08-04
  • 2021-12-15
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
猜你喜欢
  • 2022-01-14
  • 2022-01-12
  • 2021-05-06
  • 2022-01-19
  • 2021-11-21
  • 2021-08-23
  • 2021-11-07
相关资源
相似解决方案