linux root password reset forgotten

In single-user mode, Linux does not require the root password, which makes very easy to change the root password. To know when the system boots into multi-user mode fails, how to enter single-user mode, it is very important.

1, during system startup, the start screen appears, press any key to enter the GRUB menu options.
If no such hope prompt, direct access to the GRUB menu options, delete the configuration file grub.conf in "hiddenmenu" items can be.
2, press "e" key to edit the GRUB boot menu option, press the "e" key after the GRUB screen. By moving the arrow key kernel line, and press the "e" button,
3, added at the end of the line the cursor is single, and press Enter to return before a screen, press the "b" key to boot, the system automatically enters the single-user mode, sh-3.1 # passwd root: If you want to change the root password, the command is executed

After the change is successful, execute the command exit to exit restart.

 

 

 

 

You can go to correct the many problems that prevent normal startup in single user mode, such as:
1, disable the service may suspend operation of the system as Samba service is disabled, execute: sh-3.1 # chkconfig smb next system will not boot off start the Samba service.
2, change the system default run level if the X Window can not start or fails, you can edit the / etc / inittab file using a text log, change the initdefault level to guide 3: id: 3: initdefault:

Guess you like

Origin www.cnblogs.com/lynsen/p/11570083.html