5 ms·
Isn't this exactly what sudo / sudoers is for? You can specify a single command or even restrict down to which arguments an unprivileged user can pass to that o
by Tiksi 10y ago
Isn't this exactly what sudo / sudoers is for? You can specify a single command or even restrict down to which arguments an unprivileged user can pass to that one command.
- superuser2 10y agoI suppose so, but I'd much rather work with a directory of files than a dense config file inside visudo.
- Tiksi 10y agoYou could do something like unprivuser ALL=NOPASSWD:/usr/bin/bash /path/to/directory/with/files/* It'd be a mild annoyance to have to explicitly run them with bash: sudo bash /path/to/directory/with/files/thingtorun but you wouldn't have to mess with the config past that.
- Godel_unicode 10y agoPro-tip: if you're going to go this route, stick these lines in a file in sudoers.d as you're likely to end up with a lot of them, this will help make your config more readable.