[sudo-users] how to change default sudo-io location; iolog_dir ; iolog_file
Todd C. Miller
Todd.Miller at sudo.ws
Thu Dec 20 07:01:46 MST 2018
The problem with using /var/log/sudo-io/$hostname/$username/$epochtime
is that you can easily run multiple commands a second. You will
probably need to use a mktemp-style suffix to avoid collisions.
The following works for me:
Defaults iolog_dir = /var/log/sudo-io/%{hostname}/%{user}
Defaults iolog_file = %s.XXXXXX
This will store the I/O logs in /var/log/sudo-io/$hostname/$username
where each one is named by the epoch time followed by a random
suffix to avoid collisions.
It should be supported by sudo 1.8.0 and above.
If you don't want the random suffix you can remove the XXXXXX but
if there is a collision, sudo will overwrite the old I/O log which
is probably not what you want.
- todd
More information about the sudo-users
mailing list