Quote:
Originally Posted by mrtwice
I would like to make this just a bit more robust by nagging any admin when they logoff with a message that asks them if they would like to create a changelog for what they just did on the server.
|
Failing to understand why it is important to sign off on changes right after they are made leads to not logging anything, or in case one is forced to entering anything that gets the user past it like just "blah", so I wonder if it is useful or will make things more robust. This being first and foremost a matter of discipline, your standard weapon of choice should be
education, not technology IMO. Also there could be potential problems like attributing and claiming changes, for instance one user logging out while another is still editing configuration files, changes made the sneaky way, changes made in earlier or interrupted sessions or simply forgetting to list everything that's been changed.
Quote:
Originally Posted by mrtwice
The changelog helper would then add some standard formatting to their comments (add a date/time, username, indent, rewrap to 70 chars per line, etc.) and prepend that to a file somewhere on the system.
|
Submitting to syslog (one of the local slots?) using 'logger' (can take aprox 300 words per line) gets you a date and timestamp and $LOGNAME should be in the
unprivileged users shell environment. Else why not just use a plain text file and a macro that adds a date and timestamp?
Quote:
Originally Posted by mrtwice
I am envisioning something that would look and work very much the way the commit/comment feature works with mercurial/git/svn, except the comment gets formatted different and saved to a file locally.
|
Ah, like using 'sudo etckeeper commit "unusually short, incomplete, non-descriptive and utterly uninteresting message.";'? ;-p
Quote:
Originally Posted by mrtwice
My uncertainties arise when I consider how I might hook this into the logout routine and default editor of the user. Also, how would I know to run the hook for a real user but not for something like sftp/scp, etc.
|
Only allowing shells that support a ~/.*logout script would be the easiest I think and a default editor you could set if none can be detected. Running a shell that is not interactive (SCP at least IIRC) should be easy to detect with
6.3.3 Interactive Shell Behavior.
* Also since this is not about Linux Security I'll move your thread to the Linux General forum or any other forum if you select a fitting one.