Get the App
SLTechnology News&Howtos  ›  Servers  › 

Centos7 reset password

Shulou Source: shulou.com Published: 2022-06-03 04:42:41 09月21日 Update

1. Turn on the power and press'e' on the interface to enter the system to enter the editing page:

two。 Add: init=/bin/sh at the end of the field at the beginning of linux16

3. Press the "ctrl+X" key combination to enter single user mode

Enter the following page to indicate that you have successfully entered single-user mode. After entering single-user mode, the file system is read-only. Enter the command 'mount-o remount,rw /' to change to read-write mode.

4. Use the command 'passwd' to reset the password:

5. Use 'touch / .autorelabel' to create selinux security tags

6. Use 'exec / sbin/init' to reboot the process and restart

Verify that the login is successful:

Tags: Mode single user success command system page password security field beginning file end label power interface process login combination input validation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Shulou Information MariaDB vpn