What should I do if I forget the root password of Ubuntu?
- In the Ubuntu 16.04 system, the administrator password is lost or invalid due to misoperation, and the root password is forgotten. At this time, no root/sudo privilege operations can be performed. You can reset the root password through GRUB and restore the administrator account to a normal state.
tool
Ubuntu16.04操作系统
Reset root password
-
Start the system, display the GRUB selection menu (long press the shift key), and enter the selection interface.
-
Select (advanced settings) enter key
-
Boot to select advanced mode -> recovery mode (the newest one) -> root (directly press enter)
-
Set the password as required. Manage passwords.
command:Passwd root # 修改密码(这里修改的密码不去使用)
-
After the modification is completed, shut down and restart
-
After the implementation of the system to re-enter
sudo passwd root
the password change again. -The password is the new password
-
carry out!