I have a server deployed with CentOS 6.8.
This morning, without anyone on my team touching anything, we not have access to server with the credentials of the root user (this server is private and only accessible through the LAN).
I have tried to change the password of the root user by accessing the system and modifying the boot to ‘single‘ through GRUB and running a passwd on the root user. I reboot and tried to access with new credentials, but I did not have access.
I have tried to encode a new hash (using a perl script) and modify the shadow file; Copying the hash of the password of a user who had access; Even leaving the password blank inside the shadow file, but in no have access, so I have no idea what may be happening.
Has anyone ever had something like this or has any idea what might be happening?
The problem would not be so serious if I had another user with root permissions, but I only have one. (I’ve tried elevating the permissions of another user by modifying the sudoers file, but without success)
EDIT: More info:
I am not trying to access through SSH, I am trying to access directly from the server. The error give me is simple ‘Login incorrect’. And when I do ‘sudo su [user with access]’ tells me ‘sudoers.d is world writable’. I add this information at the question.