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 ??
Answer
You have two easy ways:
- 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. - 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.
No comments:
Post a Comment