3 ms·
In my experience, if you see * or more rarely ? in a sudo command configuration then there's a good chance there's a problem. I once saw a bunch of systemctl s
by Arch-TK 3y ago
In my experience, if you see * or more rarely ? in a sudo command configuration then there's a good chance there's a problem.
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*".
- opk 3y agoIf you want to grant particular systemctl start/stops to normal users, that can be done with policykit,
- BenjiWiebe 3y agoThanks, I didn't know that!