- At grub boot menu, press 'e' key on desired menu item.
- Scroll down to line with linux[16] vmlinuz
- Append the following options to the end of this line.
rd.break enforcing=0 systemd.unit=emergency.target - Ctrl-x
- mount -o remount,rw /sysroot
- chroot /sysroot
- passwd #enter new root password as prompted
- exit #chroot
- exit #continue original boot
Allow system to boot emergency target. Do not issue a reboot here. - Login with new root password
- ls -lZ /etc|grep unlabeled
Likely the following two files will be unlabeled:
- /etc/shadow
- /etc/fstab - restorecon /etc/shadow
- restorecon /etc/fstab
- reboot #allow normal boot
Saturday, January 19, 2019
CentOS7 Root Password Recovery
Highly condensed set of steps to recover root password. Tested in RHEL7, CentOS7 and Fedora29.
Subscribe to:
Post Comments (Atom)
KVM VM install failure with virt-install
I've been working quite a bit lately with CentOS and KVM. This includes Fedora and RedHat releases. Most of my VM creation has been done...
-
I've been working quite a bit lately with CentOS and KVM. This includes Fedora and RedHat releases. Most of my VM creation has been done...
-
This is a re-post. EMC Secure Remote Service (ESRS) is a secure, two way remote connection between EMC and your EMC products. It heartbeat...
-
The HPe Synergy platform has a very comprehensive RESTFul API and makes collecting data a very simple process once you have the basics down ...
No comments:
Post a Comment