How can I use etckeeper via sudo with different users and have the correct user in the commit message? [duplicate]

Solution 1:

I just tested this out and got this for my output on git log:

commit 1a8e8fb2952cd6e80f0a5211e8d4e8f698fbd02c
Author: ngrayson <ngrayson@<hostname>
Date:   Thu Jan 10 18:09:47 2013 +0000

    init

So it looks like it should grab the user and not run it as root.