Linux root password retrieval

Source: Internet
Author: User
Sunirvana label: Linux System Management

Forget Root Password

Press the Space key to enter the editing status, press the e key to edit, select the second line, press the e key to edit, press the Space key to enter 1 (to enter the single user mode), and press the Enter key, press the key B to start the instance. In single-user mode, change the password and restart the instance.

1. Retrieve the super Root Password

Tip:

E 2 E

Space 1 Press enter B

Passwork

Reboot

The password is instantly cleared!

Press the Space key to enter the editing status,

Press the e key to edit, select the second line, press the e key to edit, press the Space key to enter 1 (indicating to enter single user mode), press the Enter key, press the B key to start, enter the single user mode, change the password and restart

2. It is very easy to break the password, so the defense is carried out.

Modify/boot/GRUB/grub. conf or/etc/grub. conf (/etc/grub. conf is the link file of/boot/GRUB/grub. conf)

Timeout = 5 add

Password = Benet (enter the edited password)

Add under the title line

Password = Wang (password used to access the system)

When you enter the system again, you will be prompted to enter the password

Enter Wang to enter the system.

If you want to change the password, you also need to press the e key.

Enter Benet to enter. You can press E.

3. If you forget the password added under/etc/password

Enter Emergency Mode

# Linux rescue

# Chroot/mnt/sysimage

# Vi/etc/grub. conf

# Delete the added password line. If you forget the root password, reset it.

# Passwd Root

4. Further defense

Set BIOS password

Remove the optical drive

Disable USB port

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.