Reset Root password in CentOS7
1. In boot menu press 'e' on the top kernel in the list
2. Move down, up to linux16 entry, at the end of the line remove "rhgb quiet" and add ''rd.break enforsing=0"
3. Press Ctrl+x
4. In command prompt type mount -o remount, rw /sysroot (read-write mode)
5. In command prompt type chroot /sysroot
6. In command prompt type passwd and type new password for root
7. In command prompt type exit
8. In command prompt type mount -o remount, ro /sysroot (read-only mode)
9. In command prompt type exit
After boot process have finished, login to system like a root with a new password. And restore the security context for the password file /etc/shadow.
10. In command prompt type restorecon /etc/shadow
11. In command prompt type setenforce 1
2. Move down, up to linux16 entry, at the end of the line remove "rhgb quiet" and add ''rd.break enforsing=0"
3. Press Ctrl+x
4. In command prompt type mount -o remount, rw /sysroot (read-write mode)
5. In command prompt type chroot /sysroot
6. In command prompt type passwd and type new password for root
7. In command prompt type exit
8. In command prompt type mount -o remount, ro /sysroot (read-only mode)
9. In command prompt type exit
After boot process have finished, login to system like a root with a new password. And restore the security context for the password file /etc/shadow.
10. In command prompt type restorecon /etc/shadow
11. In command prompt type setenforce 1
Комментарии
Отправить комментарий