Re: Allow a user to shutdown
"Kurc, Marcin A." <makurc@cooperstandard.com> writes:
> man shutdown
>
> ACCESS CONTROL
> shutdown can be called from init(8) when the magic keys
> CTRL-ALT-DEL are pressed,
> by creating an appropriate entry in /etc/inittab. This means that
> everyone who has
> physical access to the console keyboard can shut the system down. To
> prevent this,
> shutdown can check to see if an authorized user is logged in on one
> of the virtual
> consoles. If shutdown is called with the -a argument (add this to the
> invocation of
> shutdown in /etc/inittab), it checks to see if the file
> /etc/shutdown.allow is pre
> sent. It then compares the login names in that file with the list
> of people that
> are logged in on a virtual console (from /var/run/utmp). Only if
> one of those
> authorized users or root is logged in, it will proceed. Otherwise it
> will write the
> message
>
> shutdown: no authorized users logged in
>
> to the (physical) system console. The format of /etc/shutdown.allow
> is one user
> name per line. Empty lines and comment lines (prefixed by a #) are
> allowed. Cur
> rently there is a limit of 32 users in this file.
>
> Note that if /etc/shutdown.allow is not present, the -a argument is
> ignored.
Now according to the instructions above I created this file
#this will allow only the named person besides root to shut-down the
#system.
#first it is oswald
oswald
#then somebody else
to test it I logged in as another user in the console and hit the
magic keys, instead of giving me the warning that: shutdown: "no
authorized users logged in" the pc rebooted, so what is missing here?
>
> Marcin Kurc
--
LinuxUser aka Josef Oswald linux.os@chello.at
registered-linux-user # 134.818 at http://counter.li.org
The box said Windows, NT or better, so I installed Linux :-)
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: