Allow any arguments for a given command with sudo
- by Mark L
I have the following sudo config entry which I added via sudo visudo:
mark ALL = NOPASSWD: /usr/bin/lxc-ls*
I can run lxc-ls with my user fine but I can't append any parameters without it demanding I prefix the command with sudo.
$ whoami
mark
$ lxc-ls
test-container
$ lxc-ls --fancy
lxc-ls: error: You must be root to access advanced container properties. Try running: sudo /usr/bin/lxc-ls
Any idea how I can edit via sudo visudo to allow for any argument after the command?
I don't want to prefix the command with sudo as I'm using a python library to execute the command and it's being funny about sudo prefixes.