Results 1 to 4 of 4

Thread: Sudo help!

  1. #1

    Default Sudo help!

    I need to setup sudo so that it can run reboot/shutdown/log off without a password.

    I've tried to figure out the sudo menu within Yast but it simply baffles me. Can anyone walk me through setting up a sudo command to not need a password?

    Thanks!
    It's cool, I read it on the INTERNET.

  2. #2
    Join Date
    Jun 2008
    Location
    Frisco, TX
    Posts
    1,233

    Default Re: Sudo help!

    On Tue, 2008-07-29 at 17:06 +0000, Crix Maydine wrote:
    > I need to setup sudo so that it can run reboot/shutdown/log off without
    > a password.
    >
    > I've tried to figure out the sudo menu within Yast but it simply
    > baffles me. Can anyone walk me through setting up a sudo command to
    > not need a password?
    >
    > Thanks!
    >
    >


    As root:
    visudo

    Add...

    ALL ALL=(ALL) NOPASSWD: /sbin/reboot

    Should be able now to do:

    sudo /sbin/reboot as any user without a password.



  3. #3
    Join Date
    Jun 2008
    Location
    Frisco, TX
    Posts
    1,233

    Default Re: Sudo help!

    On Tue, 2008-07-29 at 17:57 +0000, cjcox wrote:
    > On Tue, 2008-07-29 at 17:06 +0000, Crix Maydine wrote:
    > > I need to setup sudo so that it can run reboot/shutdown/log off without
    > > a password.
    > >
    > > I've tried to figure out the sudo menu within Yast but it simply
    > > baffles me. Can anyone walk me through setting up a sudo command to
    > > not need a password?

    .....
    >
    > As root:
    > visudo
    >
    > Add...
    >
    > ALL ALL=(ALL) NOPASSWD: /sbin/reboot
    >
    > Should be able now to do:
    >
    > sudo /sbin/reboot as any user without a password.
    >
    >


    Also, the default config in SUSE setups Defaults targetpw ... you'll
    see a couple of lines to comment out or remove in your sudoers when
    you edit it using visudo.



  4. #4
    Join Date
    Jul 2008
    Location
    Athens
    Posts
    106

    Default Re: Sudo help!

    U need to configure the /etc/sudoers file.
    For each user u have to add a line to permit excecuting commands without root password.Assuming your username is crix and u want to add shutdown command for theis user without the need of a password.So the line u shoudl add is:

    Code:
    crix ALL = NOPASSWD: /sbin/shutdown
    For reboot line should be

    Code:
    crix ALL = NOPASSWD: /sbin/reboot
    Now u can run sudo reboot or sudo shutdown without need of password
    "Keyboard not found. Press any key to continue"

Posting Permissions

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