Environment:
RHEL 7 system
Reset method:
1. Confirm that you are installing RHEL 7 system
cat /etc/redhat-release # 接着会弹出这样的信息 Red Hat Enterprise Linux Server release 7.0 (Maipo)
2. Restart
reboot
Recommended tutorial:linux tutorial
3. Restart the Linux system and the boot interface appears. Press "E" on the keyboard " key to enter the kernel editing interface
In the interface that appears immediately, use the direction "↓" key to scroll down, find the line starting with "linux16", and use the direction key or press the "End" key to move the cursor to the end, append the "rd.break" parameter,
and then press the Ctrl X key combination to run the modified kernel program
After about 10 seconds, enter the emergency rescue mode of the system
Finally, enter the following commands in sequence, wait for the system restart operation to complete, and then You can use a new password (you can enter your password where "New password:" appears). Here I set it to "1201" (the actual production environment password must be complex enough to ensure security). After restarting, you can use the new password. Password to log in.
The input command is as follows:
mount -o remount,rw /sysroot chroot /sysroot passwd touch /.autorelabel exit reboot
Recommended related video tutorials:linux video tutorial
The above is the detailed content of How to reset administrator password in linux. For more information, please follow other related articles on the PHP Chinese website!