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

Re: Prevent normal users from power actions



On Thu 29 Sep 2022 at 18:55:03 (+0200), Christoph Pleger wrote:
> > I suppose it might be worth mentioning how your users reboot or
> > shutdown the system, and whether this applies only when seated at
> > a console or even to all users (for those of us who reboot with
> > CtrlAltDel and shutdown by touching the physical power button).
> 
> When a user has started a graphical user session, like GNOME, KDE etc.,
> there are several options to end or pause the session (without pressing
> the power button or Ctrl-Alt-Del): Log out, Shutdown, Reboot, Suspend,
> Hibernate, and maybe others. What I want is to require the user to
> enter the root password in order to reboot or shutdown

Perhaps the answer lies in /etc/systemd/logind.conf with its array of
Handle*= and *IgnoreInhibited= settings.

> (and of course I
> know that it is possible to shutdown or reboot the hard way).

FTR, CtrlAltDel and touching the physical power button are "soft"
ways, as opposed to the Reset button (typical on 20th century PCs),
holding down the Power button, or just cutting the power. (I always
used to disconnect the Reset button from the mobo, first thing after
I acquired any PC.)

Cheers,
David.


Reply to: