I broke sudo when I wrongly edited a file in /etc/sudoers.d in vi(did not use visudo :-().

I read that I could fix the same by rebooting into the 'Recovery Mode' by selecting the same from the grub menu.

However I'd earlier disabled the showing of the grub menu by editing /etc/default/grub. As a result I can't seem to go into recovery mode to fix my broken sudo.

How can I fix sudo now??

link|improve this question

67% accept rate
1  
Well, at least you've just learned a valuable lesson. – Rein Henrichs May 5 '11 at 16:46
@Rein, you betcha.. :-) – Abhijith Madhav May 5 '11 at 16:55
feedback

1 Answer

up vote 4 down vote accepted

Hold Shift while booting, this will cause GRUB2 to show the boot menu. Next, after booting in Recovery mode, select Root shell. From there, you can edit your sudoers file by running visudo without sudo before it, you're root anyway ;)

link|improve this answer
This is useful to get hold of the grub2 boot menu too. Thanks. – Abhijith Madhav May 5 '11 at 17:00
To document an earlier answer which seems to have dissappeared by the time I tried it out(It worked for me). "Grab a live CD. Boot into it. Mount your root file system. Fix sudo". – Abhijith Madhav May 5 '11 at 17:01
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.