I ran into an issue while trying to lock down my testlab Centos 7 VM where a bash script I ran made the root password expire! Here is how to resolve:
Reboot the machine.
Follow steps in my post about getting in to pre-boot
chroot /sysroot # Set password to never expire (probably not best practice, but we change ours every 180 days anyways) chage -I -1 -m 0 -M 99999 -E -1 root # Go ahead and change it for now passwd root # Update SELinux Info touch /.autorelabel reboot -f
- Now log back in locally and see if it works!