Bug 129126

Summary: useradd etc should have more verbose logs
Product: [Fedora] Fedora Reporter: Russell Coker <russell>
Component: shadow-utilsAssignee: Eido Inoue <havill>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-23 19:23:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Russell Coker 2004-08-04 09:49:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

Description of problem:
XXX xx xx:xx:xx fedora-se useradd[PID]: new group: name=XXX, gid=XXX
XXX xx xx:xx:xx fedora-se useradd[PID]: new user: name=XXX, uid=XXX, gid=XXX, home=/home/XXX, shell=/bin/bash

The logs for useradd are in the above format.  If there are a team of administrators then this information is not sufficient to determine who performed the command.

I believe that useradd should log the tty name as well at a minimum, and for a SE Linux system it would probably be good to log the context of the parent process (so we have the SE Linux identity of the user).

Version-Release number of selected component (if applicable):
4.0.3-23

How reproducible:
Always

Steps to Reproduce:
Add a user and read /var/log/secure.

Actual Results:  XXX xx xx:xx:xx fedora-se useradd[PID]: new group: name=XXX, gid=XXX
XXX xx xx:xx:xx fedora-se useradd[PID]: new user: name=XXX, uid=XXX, gid=XXX, home=/home/XXX, shell=/bin/bash

Expected Results:  XXX xx xx:xx:xx fedora-se useradd[PID]: new group added by root:sysadm_r:sysadm_r on /dev/pts/1: name=XXX, gid=XXX
XXX xx xx:xx:xx fedora-se useradd[PID]: new user added by root:sysadm_r:sysadm_r on /dev/pts/1: name=XXX, uid=XXX, gid=XXX, home=/home/XXX, shell=/bin/bash

Additional info:

Comment 1 Eido Inoue 2004-09-23 19:23:17 UTC
logwatch and other programs unfortunately rely on the current format.