painesy Posted December 18, 2004 Report Share Posted December 18, 2004 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 Quote Link to comment Share on other sites More sharing options...
n00i3 Posted December 19, 2004 Report Share Posted December 19, 2004 here's a nice little faq :D http://mandrakeusers.org/index.php?showtopic=19256 Quote Link to comment Share on other sites More sharing options...
iphitus Posted December 20, 2004 Report Share Posted December 20, 2004 chmod 4755 /sbin/shutdown makes it runnable by anyone. i just did this last night :D Quote Link to comment Share on other sites More sharing options...
painesy Posted December 20, 2004 Author Report Share Posted December 20, 2004 Thanks for that Quote Link to comment Share on other sites More sharing options...
jlc Posted December 22, 2004 Report Share Posted December 22, 2004 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 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: Quote Link to comment Share on other sites More sharing options...
iphitus Posted December 22, 2004 Report Share Posted December 22, 2004 I dont run no server :P ISP as a general rule of thumb blocks incoming connections, so no SSH, telnet, http, rsh, or cool stuff for me. And i got a firewall :D iphitus Quote Link to comment Share on other sites More sharing options...
jlc Posted December 22, 2004 Report Share Posted December 22, 2004 Glad my isp doesn't block those connections 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 :) Quote Link to comment Share on other sites More sharing options...
iphitus Posted December 23, 2004 Report Share Posted December 23, 2004 Nobody else that values their life goes near my box :woops: Quote Link to comment Share on other sites More sharing options...
jlc Posted December 23, 2004 Report Share Posted December 23, 2004 Nobody else that values their life goes near my box :woops: <{POST_SNAPBACK}> Same here, he just said he wanted multiple people to be able to shutdown his box without giving them root, that's why i would suggest sudo. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.