Sysadmin tidbit for the day

While setting up the new host for Homeport, I’m doing a completely new installation of Debian Linux. My preferred mail system is Postfix, which uses the standard pile of configuration files and the like.
One of my beefs with Postfix is it requires all files to be owned by root. I also like having my config files all controlled via RCS so I can revert changes and see who changed what. The problem has been that RCS does not preserve file ownership, so a change to a file changes the ownership of that file to the person who made the change.
Easy, right? Just use ‘sudo’ to make the change. Ah, but this also changes the log message generated when checking the file back into RCS – they always say ‘root’. Hard to keep track of what users are doing when that happens.
Ah, but there’s a little known codicil in the Fabe… I mean sudoers(5) man page. Putting:
Defaults: !set_logname
in the sudoers file means that LOGNAME gets set to the person doing the sudo command, and in thigns like RCS, the log entry shows the actual user, not ‘root’ in the history.


A wandering geek. Toys, shiny things, pursuits and distractions.

View all posts by