8
I changed settings in sudoers file using
sudo visudo
and messed it up. Now when I try to do it again or open any file using sudo, I can't open it anymore and I get this error message:
>>> sudoers file: syntax error, line 7
What now?
Is there any way to get out of this problem (to revert the settings), or do I need to install a fresh copy of linux ?
The reason I got all this is I pressed "Q" while it was telling me there was some error, which was very stupid of me.
Thanks.
EDIT
My sudoers file is no different than normal sudoers file. I just added timestamp_timeout = 0 line in that file and all these problems arised. I did what James suggested and even removed that line (timestamp_timeout = 0). I changed file permission to 0440 which it requested, and then boot normally. Then, I get the same error message
sudoers file: syntax error, line 7
sudo: parse error in /etc/sudoers near line 7
as above.
What should I do now ??
EDIT 2 Solved
This is what I did:
- Boot using livecd
- Remove the old sudoers file
- Made new sudoers file and copied everything to that file i.e. minimum configuration settings, which I luckily had saved in another file
- Changed file permission to 0440
- Reboot again normally from harddrive
Hurray !!
you could paste the contents of your sudoers file to www.pastebin.com and let us take a look, probably the fastest way. – Andrioid – 2009-07-25T15:25:26.003
I would look for missing # on comments, missing colons, equal signs, line-continuation backslashes, etc. – Paused until further notice. – 2009-07-25T15:28:29.133