Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I'm working on a server with several admin users. Each of them can use sudo to make configuration changes. We're keepeing our /etc directory version-controlled using etckeeper.

However, when I or another admin calls sudo etckeeper commit COMMITMESSAGE, git uses the root user's name and e-mail for the commit message. Setting git config on the etc repository doesn't work in this case, because then each time etckeeper commit is called, the same data will be used.

What I want is the actual user's name and email be present in the etckeeper git repository, so that from the commit log I can track down who did which change.

Any help is greatly appreciated!

share|improve this question

marked as duplicate by Ward, sysadmin1138 Aug 22 '13 at 21:31

This question was marked as an exact duplicate of an existing question.

That's strange, as the man page states Note that etckeeper commit will notice if a user has used sudo or su to become root, and record the original username in the commit. – Sven Dec 29 '12 at 17:36

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


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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.