How do I limit the users a specific user can run commands in linux?
- by user8571
I have 2 user accounts, foo and bar
I want to allow user foo to execute commands as root and any other user ie:
sudo su root -c'./run-my-script'
sudo su bar -c'./another-script'
sudo su another -c'./yet-another-script
I also want to allow user bar to execute commands as other user but only a subset and not root ie:
sudo su bar -c'./run-my-script'
but not
sudo su root -c'./run-my-script'
Is this possible ?