Cannot log in as root after sudo config
I am no longer able to log in as root. Is there an easy way to fix this?
I configured sudo like this: Code:
root ALL=(ALL) ALL Code:
root ALL=(ALL) ALL I was not able to do this: su - It gave the error: Code:
command steve: file or folder does not exist. That was successful. But I was not able to change to root in the terminal. I then delete the x in second field on the root line in /etc/passwd . root:x:.... Also the long string of characters in the second field of root in /etc/shadow. root:$as87aeofuhdu9a8oeu..... No luck. So I did this: Code:
cp -v /var/backups/passwd.bak /etc/passwd What can I try now???? |
Try removing the
Code:
#steve ALL=(ALL) ALL Code:
root ALL=(ALL) ALL |
visudo
Was there some reason you chose not to use visudo? In Debian, visudo will drop you into nano. Make the changes (esp as suttiwit suggested) and then hit F3 (save). If there are probs with the strict structure of the sudoers file, then visudo will report it back to you. If all's well, save the changes and hopefully you'll be OK.
Personally, I've found that changing things willy-nilly as root is NOT a very good idea. Quote:
|
certainquirk:
I think that I did use visudo. The problem is when I tried to undo it. I should have left it the way it was when it was working. I fix it myself some kind of way. |
All times are GMT -5. The time now is 10:44 AM. |