-   Slackware (
-   -   enabling poweroff/reboot for user (

YBA^[x] 12-12-2004 09:57 AM

enabling poweroff/reboot for user

How do I enable poweroff and reboot for users?


mdarby 12-12-2004 10:11 AM

check out the sudo command

YBA^[x] 12-12-2004 10:33 AM

Sweet. Thanks a bunch.

YBA^[x] 12-12-2004 01:51 PM

I'm having some issues with it. I've added this to sudoers:

yourusername yourhostname = NOPASSWD: /sbin/reboot, /sbin/halt -h now, /sbin/halt

This ought to enable me to use commands as reboot and poweroff as a user, right? Or am I wrong? Wether or not, they do not work. I get an "command not found". Using /sbin/halt works, though.... Did I miss anything?


mdarby 12-12-2004 01:57 PM


I'm not sure, I've never allowed any user shutdown my servers!

Cedrik 12-12-2004 03:34 PM

You have to add /sbin in your path, maybe in your ~/.bashrc file or put an alias in it, like

alias reboot="/sbin/reboot"

Ipolit 12-12-2004 03:37 PM

never worked for me too.
chmod 777 /sbin/reboot too

YBA^[x] 12-12-2004 03:57 PM

How do I add to the path?

Cedrik 12-12-2004 04:17 PM



# another solution :
alias reboot="sudo /sbin/reboot"

SlackerLX 12-12-2004 04:30 PM

if god's command "chmod 777" does not work there is always the dark side which I personally like, cause it worked for me
chmod 666

ringwraith 12-12-2004 09:28 PM

chmod +s /sbin/halt

YBA^[x] 12-13-2004 02:04 AM

Thanks a lot to all of you. After adding /sbin to the path and chmod +s /sbin/halt, it finally works.


All times are GMT -5. The time now is 03:09 PM.