0

I'm using ubuntu 14.04 and I messed visudo and now sudo code is not working. So, I tried to fix it but because I'm not root user, I can't access to visudo to fix what I messed. so I tried reboot and use advanced ubuntu, but when I access to drop to root shell prompt, it keep asks password and control d is not working either. What should I do? please help.

  • It only does that if you have set a root password. If you do not know the password, you need to reset it with a live usb, same as any user – Panther Oct 6 '15 at 22:21
0

If your hard drive isn't encrpyted (home folder encryption doesn't matter for this), boot into a live session and manipulate the file from there. Make sure to manipulate the file you find on your internal partition, not the one of the live system.

| improve this answer | |
  • how can I manipulate the file on live session? – Francis Kim Oct 6 '15 at 22:21
  • You use the usb stick you used to install ubuntu but when it asks you whether you want to install or try Ubuntu, you choose "try Ubuntu". Then you open Nautilus and see your internal partition(s). You click on your system partition and it will mount it. Then navigate to the file. You will need sudo to edit the file nonetheless, no right-click and choose Open Terminal if you're using Ubuntu 15.04 as your live system, or copy the path to easily get there if you're using any other version of Ubuntu. Save the file normally, unmount the partition and boot into your normal system. – UTF-8 Oct 6 '15 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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