Re: temporarily disable shutdown
Quoting Matthias Bodenbinder (matthias@bodenbinder.de):
> [...] And even on the commandline a "poweroff" is still successfully executed.
You haven't said whether the commandline is being typed on a console
VC, or remotely. It makes a big difference. For example:
jessiebox ~$ ls -l /sbin/poweroff
lrwxrwxrwx 1 root root 14 Feb 13 05:45 /sbin/poweroff -> /bin/systemctl
jessiebox ~$ /sbin/poweroff
==== AUTHENTICATING FOR org.freedesktop.login1.power-off ===
Authentication is required for powering off the system.
Authenticating as: root
Password: ← typed root's password
==== AUTHENTICATION COMPLETE ===
jessiebox ~$ Connection to jessiebox closed by remote host.
Connection to jessiebox closed.
wheezybox ~$ ls -l /sbin/poweroff
lrwxrwxrwx 1 root root 4 Jul 17 2013 /sbin/poweroff -> halt
wheezybox ~$ ls -l /sbin/halt
-rwxr-xr-x 1 root root 13848 Jul 17 2013 /sbin/halt
wheezybox ~$ /sbin/poweroff
poweroff: must be superuser.
wheezybox ~$
So wheezy just runs a binary that checks for root.
Jessie (running systemd) makes me authenticate if I'm remote, but will
shutdown straightaway if I type the command on the console. Which is
reasonable since all I have to do otherwise is press CtrlAltDel or the
power button to achieve the same effect.
Cheers,
David.
Reply to: