Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a Ubuntu system. Today, I accidentally changed the sudoers file in /etc due to which my normal user prathmesh is not able to perform sudo operation. I don't know how to go to the root mode. I am trying "su" but it is giving me authentication failure error. Plus I don't remember setting root user's password ever.

What is the best way to solve this situation ?? Use a live CD to change the sudoers file or something else ??

share|improve this question

migrated from stackoverflow.com May 28 '12 at 21:52

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 0 down vote accepted

You have two easy ways:

  1. use the Ubuntu installation CD, choose the "rescue a system" option and then drop into the shell (of the target system) to change the password of the user(s) or modify the /etc/sudoers to your liking.
  2. boot into single user mode and modify the passwords or /etc/sudoers.

The second method may be hard on more recent Ubuntu versions where GRUB doesn't wait for you to choose the single user mode.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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