Last active
December 18, 2020 21:07
-
-
Save spryffee/249ecfc10e08d6dcd3dc889a18f127bd to your computer and use it in GitHub Desktop.
recover root password in CentOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e # boot to the GRUB edit mode | |
quiet ... rd.break # rd.break at the end of the line starting with kernel= | |
ctrl-x | |
mount -o remount,rw /sysroot/ | |
chroot /sysroot | |
passwd | |
touch /.autorelabel # update selinux information | |
exit | |
logout | |
# wait for the file-system relabeling to complete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment