Five methods after linux system password is forgotten

Source: Internet
Author: User
Article Title: five methods after the linux system password is forgotten. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I. lilo Guidance

1. When lilo appears: Enter linux single

Boot: linux single

2. Press enter to directly enter linux single-user mode 3. vi/etc/passwd

Delete the password from the root account

(You can also use the passwd command to reset the root password)

4. Restart reboot. the root password is blank.

Ii. grub boot

1. when the grub screen appears, select the linux boot item and press the e key 2. select a line starting with kernel and press the e key. At the end of the line, press the Space key and enter single to exit the editing mode with the Enter key. 3. press enter to return, and then press the B key to start, you can directly enter the linux single-user mode 4. vi/etc/passwd

Delete the password from the root account

(You can also use the passwd command to reset the root password)

5. Restart reboot. the root password is blank.

3. boot a floppy disk in linux

Enter linux single

You can enter the single-user mode;

Modify or delete the root password;

4. Use a Linux system to install a disk

If you do not have a system boot floppy disk and the system boot LILO and GRUB are deleted, you can only use the Linux system installation disk to restore the root password.

Start with the first Linux system installation disk. Enter the following command after the boot prompt is displayed:

Oot: linux rescue

At this time, the system enters the rescue mode and completes as prompted: 1. select the language and keyboard format. 2. select whether to configure the NIC. Generally, the NIC configuration can be skipped because the network is not required. 3. select whether to enable the system to search for the Redhat Linux system on the hard disk and choose continue. 4. the system shows that the system on the hard disk has been found and mounted to/mnt/sysimage; 5. enter the rescue status. You can reset the root password:

# Chroot/mnt/sysimage (make the system a root environment)

# Cd/mnt/sysimage

# Passwd root

5. If you are not in trouble, you can detach the linux hard disk and mount it to other system environments.

Modify the/etc/passwd file and save the modification;

Note:

1. The single Input Method and method may be different in different linux systems, and you may want to try it on your own. 2. In addition to modifying the/etc/passwd file, you may also need to modify the/etc/shadow file, which is the projection file of the/etc/passwd password file;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.