If I understand correctly there is actually one script (7dtd.sh) and it accepts arguments?
Apparently writing the command with it's arguments in the sudoers file, will only allow the command to be run with these SPECIFIC arguments.
You 'll need multiple entries I think. Also it will probably need some wild-card for the <instancename> (or if you want to limit the user to specific instances you could the exact instance as an argument on the sudoers file) because if you write
Code:
joe ALL=(ALL) NOPASSWD: /full/path/to/7dtd.sh start
The Admin trying
Code:
/full/path/to/7dtd.sh start <instance>
will probably have his command rejected by sudo. So you 'll have to put
Code:
joe ALL=(ALL) NOPASSWD: /full/path/to/7dtd.sh start *
This will allow them to run
Code:
sudo /full/path/to/7dtd.sh start <anything>
so they can pass <instance> to the script. You can limit a bit what kind of arguments they can pass using wildcards
I have not actually tested this though, so backup and try it with care.
Bookmarks