--Enter edit mode on the GRUB2 startup screen
Press e
on the kernel selection screen to enter edit mode
--Make changes in edit mode
Delete the rhgb quiet LANG = ja_JP.UTF-8
on the line starting with linux16
--Add to the deleted place
Add rw init = / bin / sh
to the deleted location.
After adding it, start it with Ctrl + x
.
--Change to new password
When the console starts, change the root password using the following command.
# passwd
I'm angry here that the password is less than 7 characters, but I was able to change it.
If you can change the password, start it as follows.
# exec /sbin/init
--Login
After booting, log in with the new root password.
-How to change root user password in CentOS7 [Old single user mode]
Recommended Posts