LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to allow a not root user to shutdown (https://www.linuxquestions.org/questions/linux-general-1/how-to-allow-a-not-root-user-to-shutdown-23587/)

ethanchic 06-16-2002 10:05 PM

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

jayakrishnan 06-17-2002 12:34 AM

try changing the permission of the shutdown command

sakeeb 06-17-2002 12:35 AM

try

halt
poweroff

neo77777 06-17-2002 01:00 AM

you need to put suid bit
chmod 4755 /sbin/shutdown

jglen490 06-17-2002 07:56 AM

Quote:

...and editted the /etc/inittab ca::ctrlaltdel:/sbin/shutdown -a -t5 -rf now
Comment out the existing inittab entry (with # in first position of the line) and add a new entry:

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.

zLinuxz 06-17-2002 08:32 AM

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

jglen490 06-17-2002 08:37 AM

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 :) !!

zLinuxz 06-17-2002 08:48 AM

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.

jglen490 06-17-2002 04:20 PM

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 !!

ethanchic 06-18-2002 05:08 AM

thank's for your replies guys it help me a lot
:) :) :)


All times are GMT -5. The time now is 08:37 AM.