Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Sudoers issue on 12.04 beta 4

  1. #1
    Join Date
    May 2006
    Location
    UK
    Beans
    106
    Distro
    Kubuntu

    Sudoers issue on 12.04 beta 4

    Was directed here from the Ubuntu +1 forum.
    I seem to have run into an issue with sudo on lubuntu 12.04 beta 2. I have added the following line to sudoers (using "sudo visudo"), but I still get prompted for a sudo password when using truecrypt or fsck.
    Code:
    userid    ALL=(ALL) NOPASSWD: /usr/bin/truecrypt, /sbin/fsck -a
    I know there are security implications and things with that line, but the issue is that is should allow me to run truecrypt and fsck -a without typing in my password and it doesn't seem to work.

  2. #2
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Sudoers issue on 12.04 beta 4

    Hi

    Quote Originally Posted by cesera View Post
    Was directed here from the Ubuntu +1 forum.
    I seem to have run into an issue with sudo on lubuntu 12.04 beta 2. I have added the following line to sudoers (using "sudo visudo"), but I still get prompted for a sudo password when using truecrypt or fsck.
    Code:
    userid    ALL=(ALL) NOPASSWD: /usr/bin/truecrypt, /sbin/fsck -a
    I know there are security implications and things with that line, but the issue is that is should allow me to run truecrypt and fsck -a without typing in my password and it doesn't seem to work.
    This is from mine

    Code:
    matthew ALL=NOPASSWD: /usr/bin/apt-get, /usr/sbin/iotop
    Check out

    Code:
    man sudoers
    for more information. The man pages can be better than internet tutorials.

    Kind regards
    Last edited by matt_symes; April 5th, 2012 at 12:59 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  3. #3
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Sudoers issue on 12.04 beta 4

    Can you post your full /etc/sudoers file so we can take a look.
    Cheesemill

  4. #4
    Join Date
    May 2006
    Location
    UK
    Beans
    106
    Distro
    Kubuntu

    Re: Sudoers issue on 12.04 beta 4

    Here is a copy of my sudoers file, had to add the .txt extension to get it to upload. Most of the file is just the default file, I have only added the one line. I have had a long look at the man page and can't find anything wrong. I presume it is something simple that I have missed, so any clues would be appreciated.

    Thanks,
    Kees
    Attached Files Attached Files

  5. #5
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Sudoers issue on 12.04 beta 4

    The only suggestion that I have is to try moving your added line to the bottom of the file, then log off / log on and try again.

    Edit - Another suggestion, try removing the spaces so it reads as follows:
    Code:
    kees     ALL=(ALL)NOPASSWD:/usr/bin/truecrypt,/sbin/fsck -a
    Last edited by Cheesemill; April 6th, 2012 at 05:52 PM.
    Cheesemill

  6. #6
    Soul-Sing is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Aug 2006
    Beans
    1,374
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Sudoers issue on 12.04 beta 4

    Code:
    %truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt
    bottomline please

    via
    Code:
    sudo visudo

  7. #7
    Join Date
    May 2006
    Location
    UK
    Beans
    106
    Distro
    Kubuntu

    Re: Sudoers issue on 12.04 beta 4

    Quote Originally Posted by Cheesemill View Post
    The only suggestion that I have is to try moving your added line to the bottom of the file, then log off / log on and try again.

    Edit - Another suggestion, try removing the spaces so it reads as follows:
    Code:
    kees     ALL=(ALL)NOPASSWD:/usr/bin/truecrypt,/sbin/fsck -a
    Did both and that did the trick. Just don't understand why it has to be at the bottom of the file, have looked at the man page again and not sure what difference it makes in this case. I am not using any thing that needs to be set before I include it.

    Thanks you very much.

  8. #8
    Join Date
    May 2006
    Location
    UK
    Beans
    106
    Distro
    Kubuntu

    Re: Sudoers issue on 12.04 beta 4

    Quote Originally Posted by leoquant View Post
    Code:
    %truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt
    bottomline please
    That would work as well, but not for the 'fsck -a', which I like to include otherwise I have to enter my password whenever checking the truecrypt volumes.

    Thanks for your help.
    Last edited by cesera; April 7th, 2012 at 08:45 AM.

  9. #9
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Sudoers issue on 12.04 beta 4

    Quote Originally Posted by cesera View Post
    Did both and that did the trick. Just don't understand why it has to be at the bottom of the file, have looked at the man page again and not sure what difference it makes in this case. I am not using any thing that needs to be set before I include it.

    Thanks you very much.
    Statements in the sudoers file get applied in the order the occur in the file, and override any conflicting statements above them. In your original attempt, the nopasswd statement was being applied properly, but then being overidden by the '%sudo ALL=(ALL:ALL) ALL' statement at the bottom of the file, which meant that anyone in the sudo group had to supply a passward for all commands.

    Hope this makes sense
    Cheesemill

  10. #10
    Join Date
    May 2006
    Location
    UK
    Beans
    106
    Distro
    Kubuntu

    Re: Sudoers issue on 12.04 beta 4

    Quote Originally Posted by Cheesemill View Post
    Statements in the sudoers file get applied in the order the occur in the file, and override any conflicting statements above them. In your original attempt, the nopasswd statement was being applied properly, but then being overidden by the '%sudo ALL=(ALL:ALL) ALL' statement at the bottom of the file, which meant that anyone in the sudo group had to supply a passward for all commands.

    Hope this makes sense
    That makes lots of sense. Thanks for clarifying that.

Page 1 of 2 12 LastLast

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
  •