[sudo-users] %u in command string

Benjamin Roberts benjamin.roberts at anu.edu.au
Wed Oct 5 03:06:21 MDT 2016

Hi all

I just tried to enter a sudoers rule which used the calling username as
a parameter in the command string (using %u). As far as I can see this
isn't supported in the command string, but %u expansion is supported in
other places (like the prompt?).

In particular, the rule was to be: `%group host=(www-data) NOPASSWD:
/usr/bin/htdigest /path/to/.htdigest Realm %u`.

I've since written a wrapper utility to take care of this without sudo,
but is it possible to define a rule that accomplishes what I expect the
above to?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://www.sudo.ws/pipermail/sudo-users/attachments/20161005/a9a91bae/attachment.bin>

More information about the sudo-users mailing list