Results 1 to 3 of 3

Thread: [SOLVED] changes in sudoers file take no effect

  1. #1
    Join Date
    Jan 2007
    Location
    Germany
    Beans
    107
    Distro
    Ubuntu 8.04 Hardy Heron

    Question [SOLVED] changes in sudoers file take no effect

    Hello,

    I wanted to add permissions to myself to start a script that invokes a vpn connection without beeing asked to type in my password.

    So i started visudo (my default editor is nano,so it came up with nano, but that should not be a problem).

    No i added a line like:

    Code:
    %users ALL = NOPASSWD: /path/to/script
    After saving the changes (STRG-O; STRG-X) the visudo-wrapper didn´t complain about any errors, but still I was asked fot my password.
    So I tried different ways of telling sudoers-file what I want, like throgh User_Aliases, Cmnd_Aliases and whatever,
    I even rebooted.

    No effect...

    Any Ideas?


    Thanks a lot

  2. #2
    Join Date
    Feb 2007
    Beans
    4,045
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: changes in sudoers file take no effect

    The order of the lines are important. It should be below the %admin-line, or else the %admin line will override your NOPASSWD-line. Also, if only you need to be able to run that command without password, use your username instead of %users.
    Code:
    ...
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    
    yourusername ALL=NOPASSWD: /path/to/script

  3. #3
    Join Date
    Jan 2007
    Location
    Germany
    Beans
    107
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: changes in sudoers file take no effect

    thanks a lot! so easy.... and all without annoying reboot or whatever....

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
  •