edit this article

Changing the logname with sudo

If you use sudo and RCS, the
$Author: carlos $ and $Id: 20040517-newsletter.xml,v 1.2 2004/05/31 00:11:04 carlos Exp $
RCS tags always appear as root instead of the actual person that edited the file. It's possible to compare file modification times with sudo log entries, but that's tedious. There's a much simpler way using sudo options.

Edit /etc/sudoers with visudo and add the following line:

Code Listing 1

Defaults>root    !set_logname

This tells sudo not to change the logname to root, but to use the existing username. Now, RCS tags will show the real author.


rate this article:
current rating: average rating: 1.2 (30 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)