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

Thread: Skip Sudo command asking password?

Hybrid View

  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
    Mar 2009
    Beans
    6

    Re: Skip Sudo command asking password?

    Quote Originally Posted by toojays View Post
    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.


    Sorry to bring back a dead thread but I think I figured out why this wasn't working for a lot of people. The entry you put needs to be at the end, not at the top. Since the addition you make gets over-rid by another entry lower on in the sudoers file.

    Here's what I did to run a specific program as sudo without prompting for a password in Meerkat:

    Run this in terminal: sudo visudo
    At the END of the file, type in: "%yourusername ALL=NOPASSWD: /app/you/want/to/run/as/sudo" without the quotes

    Hope this helps someone looking to run something as sudo without prompting for a password.

  9. #9
    hakermania's Avatar
    hakermania is offline Τώρα ξέρεις τι γράφω εδώ!
    Join Date
    Aug 2009
    Location
    Greece
    Beans
    1,704
    Distro
    Ubuntu Development Release

    Re: Skip Sudo command asking password?

    Code:
    echo "passwd" | sudo -S synaptic
    Website

    Wallch (Wallpaper Changer): Sourceforge | Launchpad

  10. #10
    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)

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
  •