LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't "shutdown -a -r now" as a normal user, though shutdown.allow exists (https://www.linuxquestions.org/questions/linux-software-2/cant-shutdown-a-r-now-as-a-normal-user-though-shutdown-allow-exists-344403/)

mnemonic 07-18-2005 04:26 PM

Can't "shutdown -a -r now" as a normal user, though shutdown.allow exists
 
My /etc/shutdown.allow file lists my username "james." When logged in as "james" using "shutdown -a now" gives me the "you must be root to do that" and the Usage info. I'm using Gentoo with kernel 2.6. How can I allow normal users to shutdown and reboot the computer?

Half_Elf 07-19-2005 08:55 AM

I never thought there was something like shutdown.allow, that's nice to know :D

Usually on my workstation (where I am the only user) I use the setuid trick to allow user to halt/reboot ( chmod 4755 /sbin/halt and chmod 4755 /sbin/reboot ).
On a multiuser computer, my idea would be to use "sudo" to allow certain users root power when they call shutdown and/or halt and/or reboot. Refer to sudo documentation (man sudo, man /etc/sudoers) if you want info about this.

mnemonic 07-19-2005 09:00 AM

shutdown.allow is mentioned the shutdown man page. Certainly there is a way of making this feature work properly?

PTrenholme 07-19-2005 09:22 AM

I just looked at man shutdown, and one way to read the part about /etc/shutdown.allow would be that it only applies to processing of CTL-ALT-DEL.

What happens when you do a CTL-ALT-DEL (After adding the "-a" in /etc/inittab)?

mnemonic 07-19-2005 09:27 AM

Quote:

Originally posted by PTrenholme
I just looked at man shutdown, and one way to read the part about /etc/shutdown.allow would be that it only applies to processing of CTL-ALT-DEL.

What happens when you do a CTL-ALT-DEL (After adding the "-a" in /etc/inittab)?

Ctrl-alt-del works as a normal user. EDIT: If it applies only to ctrl-alt-del, then why does shutdown have the -a option? From the man page: "-a Use /etc/shutdown.allow."

dasbooter 08-15-2005 06:49 PM

I agree that is a good questions why have -a option if you arent trying to do it from the console?
Just googled up this thread with the same question in mind :)


All times are GMT -5. The time now is 12:24 AM.