Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #228993

Re: Executing 'systemctl poweroff' from script run by cron.

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: Executing 'systemctl poweroff' from script run by cron.
Date 2020-11-24 10:10 +0100
Message-ID <BeCuK-RW-11@gated-at.bofh.it> (permalink)
References <BesYt-3io-13@gated-at.bofh.it> <BeA9z-7Ly-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Nov 24, 2020 at 09:32:49AM +0300, Reco wrote:
> 	Hi.
> 
> On Mon, Nov 23, 2020 at 10:55:50PM -0000, Juan R. de Silva wrote:
> > 1. Why, when the script is run by the user cron job, the execution 
> > requires authentication, while run from the same user terminal, it does 
> > not.
> 
> What "systemctl poweroff" actually does [...]

Ugh.

Thanks for the gory details. You spoilt my breakfast ;-)

> It's a FreeDesktop standard, believe it or not.
> A user should be allowed to reboot or poweroff the computer which they
> have direct console access.

I jumped off that wagon about that time where details were being
"ironed out": once, I pushed the power switch shortly, expecting
the system to power down... instead being presented a message that
I wasn't authorized to do that.

"What the heck?" thinks I "I have physical access to that box.
I could smash it with a sledgehammer".

Looking into the problem, I came to the conclusion that, as long
as I can keep my Debian box dbus-free, all other things I don't
like stay away too.

Yes, if I want to do videoconf these days I have to start Firefox
under apulse (they manage to maintain Firefox for three different
platforms, but for Linux they can't do alsa/pulseaudio: quite
hard for me to stick to Hanlon's Razor, but I try). Other apps
whine that they miss dbus. If I really care about them (Emacs,
I'm looking at you) I do compile them with dbus configured out.
Bluetooth. No bluetooth. I don't care.

But those are minor inconveniences.

Thanks (this time genuine thanks!) to people like you: you help
me to stay informed without having all the pain myself :-)

Cheers
 - t

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Executing 'systemctl poweroff' from script run by cron. "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2020-11-24 00:00 +0100
  Re: Executing 'systemctl poweroff' from script run by cron. Reco <recoverym4n@enotuniq.net> - 2020-11-24 07:40 +0100
    Re: Executing 'systemctl poweroff' from script run by cron. <tomas@tuxteam.de> - 2020-11-24 10:10 +0100
      Re: Executing 'systemctl poweroff' from script run by cron. Reco <recoverym4n@enotuniq.net> - 2020-11-24 12:00 +0100
        Re: Executing 'systemctl poweroff' from script run by cron. Nicholas Geovanis <nickgeovanis@gmail.com> - 2020-11-24 13:10 +0100
          Re: Executing 'systemctl poweroff' from script run by cron. <tomas@tuxteam.de> - 2020-11-24 13:20 +0100
          Re: Executing 'systemctl poweroff' from script run by cron. Fred <fred@blakemfg.com> - 2020-11-24 15:00 +0100

csiph-web