howto allow anyone to poweroff?

Erich Dollansky freebsd.ed.lists at sumeritec.com
Thu Aug 8 01:47:17 UTC 2019


Hi,

On Wed, 7 Aug 2019 18:37:35 +0200
hw <hw at gc-24.de> wrote:

> Hi,
> 
> is there a way to allow ordinary users to poweroff a machine?  I'd
> like to automatically poweroff PXE booted clients once the user that
> was logged in logs out after using it.

an unconventional way would be to have a cron job checking if someone
is locked in an power off the machine if none is logged in. You do not
have problems with the access rights but might run into the problem
that the machine shutsdown when somebody just has arrived at the
machine.

You also can catch the logout event and shut the machine down then. It
is the problem with the access right again.

Erich


More information about the freebsd-questions mailing list