Why can't I authenticate as root anymore? I haven't changed anything

December 24, 2018 521 views
DigitalOcean Linux Basics

I usually log into my server via SSH as a non-root user and then authenticate myself as root using the su command whenever I need it.
The thing is I haven't changed a thing (not configurations, passwords, installations, etc.) and since last Saturday I get an "Authentication Failure" message whenever I try to su.
I've seen some solutions to this problem but most of them require access to editing files and issuing commands that my current user has no privileges for.

What can I do to solve this issue?

2 Answers

So many things could be wrong and only the logs can tell. You'll likely need to boot into recovery mode and mount the disks read only to inspect the server and logs. Or if you have remote root login enabled, reset your password via DO and then get in with root and review the logs (/var/log/secure has more info on why logins fail).

Cheers

Did you verify the contents of the sudoers file? If you're not listed there any longer, or somehow been modified, you won't be able to su.

Have another answer? Share your knowledge.