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

Thread: Skip Sudo command asking password?

  1. #1
    Join Date
    Feb 2005
    Beans
    21

    Skip Sudo command asking password?

    How I can skip sudo command asking password in a script or in a program launchers? Example so k3b would not ask everytime sudo password when i start the program?

    I would only like to disable sudo password in my own script and in a couple of programs, so no permanent disable option..

    -Thanks

  2. #2
    Join Date
    Feb 2005
    Beans
    Hidden!

    Re: Skip Sudo command asking password?

    Quote Originally Posted by Tubuntu
    How I can skip sudo command asking password in a script or in a program launchers? Example so k3b would not ask everytime sudo password when i start the program?

    I would only like to disable sudo password in my own script and in a couple of programs, so no permanent disable option..

    -Thanks
    Try this
    http://ubuntuguide.org/#usesudowithoutpasswordprompt

  3. #3
    Join Date
    Oct 2004
    Location
    Canada
    Beans
    208

    Re: Skip Sudo command asking password?

    You can also very control sudo to a specific command. So you could have k3b ask for no password, while leaving it for all other programs.

    Corey

  4. #4
    Join Date
    Feb 2005
    Beans
    21

    Re: Skip Sudo command asking password?

    Quote Originally Posted by Burgundavia
    You can also very control sudo to a specific command. So you could have k3b ask for no password, while leaving it for all other programs.

    Corey
    --> Sorry, but how I can do that? (very control sudo?)



    bored2k: I dont want to disable Sudo asking password for all program
    only disable it from k3b..
    Thank you anyway T

  5. #5
    Join Date
    Jan 2005
    Location
    Adelaide, Australia
    Beans
    340

    Re: Skip Sudo command asking password?

    You control sudo through the "sudoers" file. To edit this file, run "sudo visudo".

    I haven't tested this, but I think the following would allow all users in the "cdrom" group to run "sudo k3b" without needing a password:
    Code:
    %cdrom    ALL = NOPASSWD: /usr/bin/k3b
    For more information, see the sudoers man page.

  6. #6
    Join Date
    Feb 2005
    Beans
    21

    Re: Skip Sudo command asking password?

    Best thanks to you toojays

  7. #7
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Skip Sudo command asking password?

    Use extreme caution with granting all-trusting sudo access:

    1. Any script running under your name can try to sudo to root -- Malicious programs can easily gain root access under your account, if you have passwordless sudo.

    2. A program running as root easily allows other programs to be run as root. Don't grant sudo -- even on individual programs -- to all users. It's pretty easy to turn K3b into a text editor, then grant more sudo privs!
    Quote Originally Posted by tuxradar
    Linux's audio architecture is more like the layers of the Earth's crust than the network model, with lower levels occasionally erupting on to the surface, causing confusion and distress, and upper layers moving to displace the underlying technology that was originally hidden

  8. #8
    Join Date
    Oct 2004
    Location
    Oslo
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Skip Sudo command asking password?

    This works for me:

    sudo visudo
    add:
    %steffen ALL = NOPASSWD: /usr/bin/k3b
    %steffen ALL = NOPASSWD: /usr/bin/amarok
    (note: I am in group 'steffen'. Look in your User and Groups section in Gnome preferences)

  9. #9
    Join Date
    Jan 2008
    Beans
    8

    Question Re: Skip Sudo command asking password?

    hi all,

    iv tried to find documentation on re-enabling the sudo password and i couldnt find it out. everything is to vage and link that was posted "http://ubuntuguide.org/#usesudowithoutpasswordprompt" its like the frikin Bible, so i couldnt find what i needed its just too mutch info for this specific subject.

    first off, im running gutsy on Gnome not kde, so, for my understanding this is done diferently.

    a friend of mine did this in my computer, he told me i wouldnt have to type in the password everytime i run a sudo command, so i let him do that (it was another thing i could learn to) but i dont want my box exposed to this weekness.

    Can somebody please leed me to the readings were this is done, or just post the code so i can do it quikly please? i dont feel confortable with this weekness in my box! i think he edited 2 diferent files, cant remember witch ones!

    Help!

  10. #10
    Join Date
    Jul 2007
    Beans
    1,577

    Re: Skip Sudo command asking password?

    He probably edited /etc/sudoers. You can edit this yourself by typing
    Code:
    sudo visudo
    Look for anywhere that says NOPASSWD and remove those bits or comment them out (put a # in front of them).

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
  •