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!
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!
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:
crix ALL = NOPASSWD: /sbin/shutdown
For reboot line should be
crix ALL = NOPASSWD: /sbin/reboot
Now u can run sudo reboot or sudo shutdown without need of password
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.
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.