Linux Baidu Cloud Compute Entering Single User Mode to Reset Root Paasword
Background
If the password cannot be reset using the BCC console, use VNC to boot into single-user mode for the reset.
Risk Acknowledgements
Rebooting the server is required to access single-user mode for password reset. Evaluate the associated risks and backup important data before proceeding.
Enter single-user mode to reset password in CentOS 6
- After connecting to the server via VNC, click Send Ctrl+Alt+Del in the upper right corner to reboot the server. After entering the reboot status, promptly press Esc to proceed to the next interface:

- Press Esc to enter the Grub interface, and then press the e key:

- After that, enter the following interface, select the red-marked Kernel by pressing arrow keys, and then press the e key.

- Then, enter the following interface:

- Add at the end:
single console=tty, the modified content is as follows:

- Press the Enter key to return to the previous interface, and then press the b key to initiate the boot:

- Once the system restarts, it will enter single-user mode, allowing access without a password. You can modify passwords and carry out other operations in this mode.

- Proceed with resetting the password.
To reset the root password, use the passwd command. For other users, reset the password using the format passwd user.
1$ passwd

The display of all authentication tokens updated successfully indicates successful password reset. Enter exit to exit single-user mode and return to normal mode.
Enter single-user mode to reset password in CentOS 7
- Click Send Ctrl+Alt+Del in the upper right corner to reboot the server. After entering the reboot status, promptly press Esc quickly once the page below is displayed:

This page is displayed:

- Locate the first Linux 16 section, change ro to rw, and add
console=console init=/bin/shat the end.
Press Ctrl+X to reboot and enter the single-user mode.

- Proceed with resetting the password.
To reset the root password, use the passwd command. For other users, reset the password using the format passwd user.
1$ passwd

The display of all authentication tokens updated successfully indicates successful password reset. Enter exit to exit single-user mode and return to normal mode.
Enter single-user mode to reset password in CentOS 8
- Click Send Ctrl+Alt+Del in the upper right corner to reboot the server. After entering the reboot status, promptly press Esc quickly once the page below is displayed:

This page is displayed:

- Locate the first Linux section, change ro to rw, and add
console=console init=/bin/shat the end.
Press Ctrl+X to reboot and enter the single-user mode.

- The following display confirms successful entry into single-user mode.

- Proceed with resetting the password.
To reset the root password, use the passwd command. For other users, reset the password using the format passwd user.
1$ passwd

The display of all authentication tokens updated successfully indicates successful password reset. Enter exit to exit single-user mode and return to normal mode.
Enter Single-user mode to reset password in Ubuntu 18.04
- Click the "Send Ctrl+Alt+Del" button in the upper right corner to reboot the server. After entering the reboot status, promptly press Esc quickly once the page below is displayed:

- Locate the end of the Linux line, remove unnecessary parameters up to the parameter ro, modify ro to rw (attaching the root disk partition in read-write mode), and add
init=/bin/bash.

- Press Ctrl+X to reboot and enter the single-user mode.

- Proceed with resetting the password.
To reset the root password, use the passwd command. For other users, reset the password using the format passwd user.
1$ passwd
The display of all authentication tokens updated successfully indicates successful password reset. Enter exit to exit single-user mode and return to normal mode.
Enter single-user mode to reset password in openSUSE 42.3
- Click Send Ctrl+Alt+Del in the upper right corner to reboot the server. After entering the reboot status, promptly press Esc quickly once the page below is displayed:

This page is displayed:

- Locate the first Linux section, and add
console=console init=/bin/shat the end.
Press Ctrl+X to reboot and enter the single-user mode.

- The following display confirms successful entry into single-user mode.

- Proceed with resetting the password.
To reset the root password, use the passwd command. For other users, reset the password using the format passwd user.
1$ passwd
The display of all authentication tokens updated successfully indicates successful password reset. Enter exit to exit single-user mode and return to normal mode.
