Latest web development tutorials

Forgot your password Linux Solution

Many friends often forget the case of Linux system root password, linux system root password forget how to do it? Reinstall the system? Of course not! Single-user mode change my root password.

Proceed as follows:

Reboot the linux system

4_21

3 seconds to click the Enter, the following interface

4_22

Then enter the e

4_23

In the second line of the last input side single, there is a space. Specific methods press down the tip to move to the second line, press "e" to enter edit mode

4_24 Behind plus single carriage return

4_25

Finally, press "b" to start, start after entering the single-user mode

4_26

At this time has entered single-user mode, you can change the root password. More password command passwd

4_27

Usage of the system installation CD rescue mode]

Rescue mode is rescue, this model is mainly used in the system can not enter the case. Such as, grub damage or modify a configuration file error. How to use the rescue model?

CD-ROM, press F5 to enter rescue mode

4_28

Enter input linux rescue

4_29

Select the language, I suggest you choose English

4_30

Choose us keyboard

4_31

4_32

Here to ask you whether to start the network, you may sometimes networking debugging. We choose no

4_33

Here to tell us, then the system will be mounted on / mnt / sysimage in.

There are three options:

  • Continue after the mount is proceeding.
  • Read-Only mount read-only, which is more secure, and sometimes when the file system is corrupt, read-only mode prevents damage to the file system one step closer.
  • Skip is not mounted, enter a command window mode.

Here we choose Continue.

4_34

So far, the system has been mounted to / mnt / sysimage in. Next enter, enter chroot / mnt / sysimage to enter the administrator environment.

4_35

Tip: In fact, to be under the rescue mode to change the root password.The rescue mode and windows PE system is very similar.

When running chroot / mnt / sysimage /, then ls to see the directory structure of the original system and directory structure is the same.

Yes! Now the environment and the environment of the original system is exactly the same. You can enter exit or press Ctrl + D to exit this environment. Then you look at the ls

4_36

This directory is actually a directory structure rescue mode, and our system all the documents in / mnt / sysimage directory.