I messed up a password change for root and I am now totally locked out. There are no other user accounts on the server apart from the root account.
I am able to boot from a recovery CD and gain access to the server files. I have modified the following files:
/etc/sysconfig/selinux - to disable SELINUX
/etc/passwd - to change to blank password for root::
/etc/ssh/sshd_config - to change to MaxAuthTries 1000
Now, when I log on to root using blank password, I get:
$ ssh -o PubkeyAuthentication=no
root@xxx.xxx.xxx.xxx
root@xxx.xxx.xxx.xxx's password:
Permission denied, please try again.
I think the problem is to do with the file permissions on the files I edited. I think I need to do some kind of chcon on them, but don't know what or how.
Can anyone help me please?