enable dinit shutdown/poweroff/reboot commands for all users 31 March 2022, 11:11:28 Hello, I've recently installed Artix on my old pc with dinit as my init system and dwm as my window manager.Is there a way to make dinit poweroff/reboot commands executable by normal user?I want to be able to run them from dmenu, so aliases won't work.
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #1 – 31 March 2022, 13:50:40 On any init, loginctl poweroff, loginctl reboot, etc. are the go-to answers for performing these without root.
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #2 – 31 March 2022, 14:43:12 Attempts to call 'loginctl poweroff' return 'Failed to power off system via elogind: Access denied'I'm not familiar with elogind, so I don't know how to give myself the required permission
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #3 – 31 March 2022, 17:13:44 I have opendoas set up so it doesn't require password for shutdown and reboot commands. This might not suit your definition of security.https://git.sr.ht/~strahinja/dwm/tree/master/item/sdmenuThe other solution would be to setuid root the shutdown and reboot executables. Neither solution is ideal, but then again, neither is allowing ordinary user to shutdown or reboot in general. Unix was simply not meant for desktop.Edit: Disclaimer: I use seatd instead of elogind. Last Edit: 31 March 2022, 18:22:24 by strajder
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #4 – 31 March 2022, 18:02:06 You need to configure polkit properly . 1 Likes
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #5 – 05 April 2022, 13:24:40 Strajder's sdmenu worked for me, many thanks!
Re: enable dinit shutdown/poweroff/reboot commands for all users Reply #6 – 19 July 2022, 22:05:38 Quote from: artoo – on 31 March 2022, 18:02:06You need to configure polkit properly .care to elucidate?