Linux中root密码忘记了如何重置

Doubi Gao3 posted @ 2014年3月01日 16:47 in Linux with tags ubuntu , 919 阅读

今天NC忘记了root密码,然后去网上找了如何解决的方法,太杂了,还是自己记录一下吧。

如何重置root密码,通过BIOS管理菜单进入Ubuntu的recovery mode,按e进入编辑模式,然后找到ro ..noquite 什么什么的.., 把它然后改为rw single init=/bin/bash 即可,然后按Ctrl+x保存之后,然后在命令行输入passwd重置密码即可。

Alyssa 说:
2023年1月06日 22:34

If you've forgotten your root password in Linux, don't worry - there is a way to reset it. First, reboot your system and enter the GRUB boot menu. Once The Vandals you're in the GRUB menu, select the "Recovery mode" option. This will take you to a menu with several options; select the "Drop to root shell prompt" option. This will drop you into a shell where you can change your password. To change your password, use the "passwd" command. Enter your new password twice and you're all set!


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter