Get the App
SLTechnology News&Howtos  ›  Servers  › 

Operation method of resetting administrator password by linux

Shulou Source: shulou.com Published: 2022-06-03 07:53:22 09月21日 Update

Today, what the editor shares with you is the operation method of linux reset administrator password, which many people do not know very well. Today, in order to let you know more about the operation method of linux reset administrator password, I summarized the following contents for you. Let's look down together. I'm sure you'll get something.

Environment:

RHEL 7 system

Reset method:

1. Make sure you have RHEL 7 system installed.

Cat / etc/redhat-release# then pops up this message Red Hat Enterprise Linux Server release 7. 0 (Maipo)

2. Restart

Reboot

3. Restart the Linux system and display the boot interface. Press the "E" key on the keyboard to enter the kernel editing interface.

In the interface that appears immediately after that, use the direction "↓" key to scroll down to find the line at the beginning of "linux16", move the cursor to the end through the direction key or press the "End" key, and append the "rd.break" parameter

Then press Ctrl + X to run the modified kernel program

After about 10 seconds, enter the emergency rescue mode of the system

Finally, enter the following command in turn, wait for the system to restart, and then you can use the new password (you can enter your password where the word "New password:" appears). Here I set it to "1201" (the password in the actual production environment should be complex enough to ensure security). After reboot, you can log in with the new password.

The commands entered are as follows:

Mount-o remount,rw / sysrootchroot / sysrootpasswdtouch / .autorelabelexitreboot

On the linux reset administrator password operation method to share here, of course, not only the above and everyone analysis methods, but the editor can ensure its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.

Tags: Password system method administrator management interface input content kernel command direction environment later new secret guarantee complexity security application of knowledge value information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB NVidia Shulou Tech Info Shulou Technology