As in title - I'd like to allow non-root users to execute specific command, but not binary. Eg:
# killall sshd
but not allow to kill any process.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can add the user to
/etc/sudoers (edited from
/etc/passwd, that was a mistake)
// Enable user to run a command.
userxyz ALL=(ALL) NOPASSWD: /var/lib/somecommand
// Enable user to run command, but restrict it to specific arguments.
zuerxyz ALL=(ALL) NOPASSWD: /var/lib/command ARG1 ARG2 ARG3
I'm sure there's more you can do, but this should get you going.