1

I updated sudoers file with the following line

sudo ALL=(ALL) NOPASSWD:/usr/bin/docker

after save the changes, I can't run any sudo command and I can't edit sudoers file

I get the following error:

Sorry, user xxxx is not allowed to execute '/bin/bash' as root on xxxx.

How to fix the issue ?

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Wasfi Alzoubi
  • 11
  • 1
  • 1
  • 2
  • 1
    Try this first: [How to modify an invalid '/etc/sudoers' file?](https://askubuntu.com/a/73872/178692) – steeldriver Feb 28 '21 at 22:28
  • 1
    Add the output of `id && sudo --list`. Did you edit with `sudo visudo -f /etc/sudoers`? You should avoid edit /etc/sudoers directly – Pablo Bianchi Feb 28 '21 at 22:31
  • I tried the solution mentioned here https://askubuntu.com/questions/73864/how-to-modify-an-invalid-etc-sudoers-file/73872#73872 and its working, Thanks a lot ^^ – Wasfi Alzoubi Feb 28 '21 at 22:48

1 Answers1

0

Obviously not using the visudo which refuses to allow a badly formed config file. Boot with an install disk and revert your changes by editing the file while the / partition on the drive is mounted in a Terminal session.