In the sudoers file, how can I use multiple Tag_Specs on the same line.
Normally if I don't want to ask for a password I will do something like this:
who where = (aswhom) NOPASSWD: commands
I want to use the SETENV
tag so that users can preserve environment variables. This works fine like this:
who where = (aswhom) SETENV: commands
From the sudoers(5) man page:
Tag_Spec ::= ('NOPASSWD:' | 'PASSWD:' | 'NOEXEC:' | 'EXEC:' |
'SETENV:' | 'NOSETENV:' | 'LOG_INPUT:' | 'NOLOG_INPUT:' |
'LOG_OUTPUT:' | 'NOLOG_OUTPUT:')
I can't see how I can use multiple tags on the same entry. I would both like to use NOPASSWD
and SETENV
on the same line.
The same commands:
The different commands: