Results 1 to 5 of 5

Thread: Problem with sudo

  1. #1
    Join Date
    May 2013
    Beans
    2

    Problem with sudo

    I am running 12.10 on my laptop. I tried to get rid of the need to enter password for shutdown command in terminal. I ran visudo and added the following line in the file:

    %users ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdownHowever, now when i use the sudo command in terminal, the following error message is displayed:

    sudo: parse error in /etc/sudoers near line 33
    sudo: no valid sudoers sources found, quitting
    sudo: unable to initialize policy plugin

    Now, i cant use sudo at all. Please help...

  2. #2
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,516
    Distro
    Ubuntu

    Re: Problem with sudo

    Use a live disk and edit the file

    /etc/sudoers

    at the bottom of my file I have multiple lines for each command (not sure if thats the problem)

    USERNAME ALL=NOPASSWD: /usr/sbin/iftop
    USERNAME ALL=NOPASSWD: /usr/sbin/command

  3. #3
    Join Date
    May 2013
    Beans
    2

    Re: Problem with sudo

    Wouldn't editing the file in the live cd only change it during the current session? Thanks

  4. #4
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    1,880
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Problem with sudo

    Mount the hard disk, modify the sudoers file present there, not the one in the live environment.

  5. #5
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,516
    Distro
    Ubuntu

    Re: Problem with sudo

    edit the file on your hard drive. normally under /media I think once you have clicked it to mount it

Tags for this Thread

Bookmarks

Posting Permissions

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