hw @ 2024-01-12 14:16 +01: > But how can I reboot/restart the computer from the xmpp client? I > don't want the xmpp client to run as root all the time. I would use > something like > > > system('shutdown', '-r', 'now'); > > > in the xmpp client, and that does require root privileges. To make > things more complicated, systemd will probably interfere in some ways, > and selinux also may get in the way. So how I can do that?
If you use `sudo` then you can setup a rule to allow the user to run the command `shutdown` as root. Example config for `doas`: /etc/doas.conf: permit nopass xmppuser cmd /sbin/shutdown args -r now -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/