Results 1 to 4 of 4

Thread: Sudo command doesn't work

  1. #1

    Question Sudo command doesn't work

    Hi, when i try to use the sudo command it says

    /etc/sudoers: syntax error close to line 19
    interpretation errors in /etc/sudoers close to line 19
    no vaild sudoersource found, ending
    can not initialize extension module for policy

    translated from my langue to english
    can i get access to the /etc/sudoers file without the sudo command

    Please Help!

  2. #2
    Join Date
    Sep 2006
    Ubuntu 14.04 Trusty Tahr

    Re: Sudo command doesn't work

    It's fixable, you just need to boot to recovery mode. In practice, you need to always test the correctness of /etc/sudoers when editing it before closing it. One common way to do that is to edit it with visudo

    Now that you're in a hard spot, about your only option is to reboot into recovery mode and then fix /etc/sudoers If you haven't changed Grub then you can go in that way. Otherwise, you may have to use a Live DVD or CD.

  3. #3
    Join Date
    Jul 2007
    Magic City of the Plains
    Xubuntu 16.10 Yakkety Yak

    Re: Sudo command doesn't work

    There's a default copy of /etc/sudoers here:

  4. #4
    Join Date
    Feb 2007

    Re: Sudo command doesn't work

    Assuming that your user is in the admin or sudo group, you don't have to boot into recovery mode. You can use pkexec to run a command as another user:
    pkexec visudo

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts