0

I added something in visudo and now when I want to run sudo it gives me the following error: Sorry, user reza is not allowed to execute '/bin/su' as root.

What should I do?

0

1 Answer 1

0

Since sudoers appears to be screwed up, you will have to first log in as root. To do this, simply type su -

You should then be prompted for the root password. After you log in as root, run: visudo

After you're into the sudoers file, find the mistake and fix accordingly.

If you don't know the root password, then unfortunately you may have to "single" the host and reset it. If this is the case, do a search for "single user mode Ubuntu" and you'll find instructions on how to reset the root password.

1
  • 1
    If you're in single user mode, you're already in as root, so you can just run visudo without changing the root password. Apr 11, 2017 at 3:28

Not the answer you're looking for? Browse other questions tagged .