[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with '/etc/shutdown.allow'



On Mon, Oct 16, 2000 at 06:26:20PM +0200, Andreas Hetzmannseder wrote:
> Hello, debian-users!
> 
> There are two users on my debian system, who I want to be able to reboot
> and halt without being root. For this purpose I created
> /etc/shutdown.allow with the corresponding user names. Now when I press
> Ctrl-Alt-Del the system will reboot as expected - although I have to be
> logged in as a qualified user, according to shutdown.allow.

shutdown isn't in your PATH, but even if it were it has no SUID flag so
it won't do you no good.

> This looks perfectly reasonable to me as this procedure is described in
> /etc/inittab. However when I attempt to type 'shutdown -a -r now' or
> 'shutdown -a -h now' by myself, it says 'shutdown: command not found'.
> I still have to be root in this case.

I've just read the Fine Manual just to please you:) and I think it only
effects Ctrl-Alt-Del from the console, not calling shutdown from the
command-line unless you make it a SUID program. (for the latter to have
a change of working make sure the shutdown command is in your PATH, as it
isn't by default for us mortal users)

What happens is:
the keyboard handler (running as root) intercepts the magic Ctrl-Alt-Del
and tells init to shut-up. The keyboard handler knows to do this as that
is what it was told by the /etc/inittab entry for the Ctrl-Alt-Del key
combo.

> 'man shutdown' tells me that I should add an entry in /etc/inittab, but
> I don't know what to enter... Can somebody help me please?

Well, you shouldn't add the entry but modify the excisting one and add to
that entry the '-a' flag. After that you have to do 'telinit q' to force
init to reread its configuration file. HTH

-- 
groetjes, carel



Reply to: