Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread Simon McVittie
On Wed, 28 Oct 2020 at 14:11:07 +0200, Mantas Mikulėnas wrote: > I'm not entirely sure why reboot is treated differently from halt, though. If you reboot a machine, it will (hopefully!) come back up after some downtime, so it's a limited level of denial of service and might make sense to restrict

Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread An Liu
[user@host ~]$ systemctl poweroff >> >> AUTHENTICATING FOR org.freedesktop.login1.set-wall-message >> >> Authentication is required to set a wall message >> >> Authenticating as: root >> >> Password >> > UPDATED: some of folks just kindly remind me that polkit configuration will be the

Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread An Liu
Hi, > > > Is it default behavior by design? I dont think a non-privileged user > > could reboot the system as he/she wishes. > > > > btw, I'm in an HPC related domain, if this behavior of systemctl is > > allowed, every single user could reboot the whole cluster as they wish, > > it's a disaster.

Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread An Liu
Hi, > It really depends on the policykit setup. > it is, I'm sure even i'm not good at polkit (or even i didn't know polkit, i still believe there is some config control over this) i'm saying of the default behavior after installation. > > e.g. if the user is in the wheel group, they may have

Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread Mantas Mikulėnas
On Wed, Oct 28, 2020, 13:40 An Liu wrote: > Hi, folks, > > I used to type systemctl reboot with non-privileged users, and to my > surprise, the system goes down for the reboot. > > I've tested in both debian and centos 7, they act the same, however, > systemctl halt will prompt you to enter

Re: [systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread Colin Guthrie
Hello, An Liu wrote on 28/10/2020 11:40: > Hi, folks,  > > I used to type systemctl reboot with non-privileged users, and to my > surprise, the system goes down for the reboot.  > > I've tested in both debian and centos 7, they act the same, however, > systemctl halt will prompt you to enter

[systemd-devel] systemctl reboot/halt with non-privilege user

2020-10-28 Thread An Liu
Hi, folks, I used to type systemctl reboot with non-privileged users, and to my surprise, the system goes down for the reboot. I've tested in both debian and centos 7, they act the same, however, systemctl halt will prompt you to enter administrator password to continue. Is it default behavior