Jump to content

Shutdown


painesy
 Share

Recommended Posts

I'm not sure if this is the right place but ...

 

I was wondering if anyone knew how I could allow an ordinary user to shut down the computer.

At the moment I can only run the init and shutdown commands as root and I do not want to give away the root password to the people who need to be able to shut down the server.

 

Thanks

Link to comment
Share on other sites

Just my $.02, I'm not sure I would just let "anyone" shutdown my "server" espically chmod 4755.

 

Why not just telnet over to my box with root and I'll help you out :cheesy:

 

Use sudo, you'll be safer:

 

http://www.courtesan.com/sudo/man/sudoers.html#examples

 

# User alias specification

User_Alias CRAZYBOOTERS = painesy, joebob

 

# Cmnd alias specification

Cmnd_Alias KILL = /bin/kill

Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown

Cmnd_Alias HALT = /usr/sbin/halt

Cmnd_Alias REBOOT = /usr/sbin/reboot

 

CRAZYBOOTERS localhost = KILL, SHUTDOWN, HALT, REBOOT

 

 

Something like that anyway, :deal:

Link to comment
Share on other sites

Glad my isp doesn't block those connections :cheeky:

 

I'm just saying if he wants multiple users to be able to shutdown the box and he "trust" those users I would add them to sudo to give them just what you want them to do, nothing more, nothing less :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...