Re:List of Unix binaries that can be used to bypass local se...
by opk on Friday July 07, 2023 @07:03AM
(#36629929)
If you want to grant particular systemctl start/stops to normal users, that can be done with policykit,
Re:List of Unix binaries that can be used to bypass local se...
by BenjiWiebe on Friday July 07, 2023 @01:39PM
(#36635369)
Thanks, I didn't know that!
I once saw a bunch of systemctl start someprefix* being allowed in a sudoers configuration (likewise for stop). systemctl can start more than one service at a time and the way that the sudoers configuration is checked is by glob matching the concatenated command.
If your command is literally: "systemctl" "start" "someprefix" "sshd" this gets concatenated to "systemctl start someprefix sshd" which matches the glob "systemctl start someprefix*".