how to allow a not root user to shutdown
I am having a problem on how to allow a not root user to shutdown the computer.
I have tried to make an /etc/shutdown.allow config and add one of my user and editted the /etc/inittab ca::ctrlaltdel:/sbin/shutdown -a -t5 -rf now |
try changing the permission of the shutdown command
|
try
halt poweroff |
you need to put suid bit
chmod 4755 /sbin/shutdown |
Quote:
ca::ctrlaltdel:/sbin/shutdown -h now That will allow all to halt the system, in a graceful manner, with the ctrl/alt/del keyin. Never use "halt" or "poweroff", unless nothing else works. These two commands work, but there's no guarantee what they will do to a running system. |
Hmm, usually any distribution comes with the default set so that any user can shutdown the computer, it's sort of weird yours is not working unless you've modefied it yourself before...
zLinuxz |
Sometimes the "shutdown" is put out there with the "-r" option as default. Of course, that results in a reboot after a graceful shutdown. That's the way it's been on my Mandrake installs, anyway :) !!
|
ooo, kewl. I guess that probaly does depend on the distribution, since redhat, if your bios is capable of, can actually powerdown the computer not just halt it which is nice, don't have to wait around for the halt word to appear and then to press the power button, hehhe.
|
Yeah that is good. Mandrake and my lappie power down completely with ctrl/alt/del, now that I have it do a "shutdown -h" in /etc/inittab :D !!
|
thank's for your replies guys it help me a lot
:) :) :) |
All times are GMT -5. The time now is 08:37 AM. |