Bug 623984

Summary: Enhancement: Audit and acct adoption to sudo.
Product: Red Hat Enterprise Linux 6 Reporter: faldegast
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED WORKSFORME QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: low    
Version: 6.1Keywords: RHELNAK
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-22 15:36:38 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 faldegast 2010-08-13 10:54:45 UTC
Description of problem:
Auditd and acct do not log user that run sudo, only root.

Version-Release number of selected component (if applicable):
All.

How reproducible:
List audit and acct logs.

Expected results:
Both real user (sudoer:s) GID and security context (root GID) should be logged. It would also be nice if su could be logged in this manner.

Additional info:
When multiple users have root trough sudo it is importent to be able to track changes. Currently all shown in audit and acct logs are the root user. If multiple users sudo:ed root it is impossible to know who did what. When only one user sudo:ed root sodu:s log can be used.

Comment 2 RHEL Program Management 2010-08-13 11:17:58 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 faldegast 2010-08-13 14:59:28 UTC
I did select 6.1 as target. However it may be more suited as Fedora enhancement  initially?

While I do want this enhancement I want RHEL 6.0 more so I do not want this to be considered a blocker for that release.

Comment 4 RHEL Program Management 2010-08-18 21:19:44 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 5 Steve Grubb 2010-08-18 21:24:31 UTC
This bug may already be solved under bug 569313. Please update to sudo-1.7.2p2-7.el6 and see if that fixes the problem. Sudo is supposed to log any use to the audit system.

Comment 6 faldegast 2010-08-20 06:28:18 UTC
I did experiment in Fedora (which is supposed to be the edgy one) and there is no fix there.

Sudo logs all usage. If i start bash as root it logs that, but it does NOT log what I do from bash. Audit logs that under the root GID but I wanna se what user really did it...

Comment 7 Steve Grubb 2010-08-20 10:41:02 UTC
OK, then if you are wanting keystrokes, you should take a look at the pam_tty_audit module. The man page shows how to set it up. Add that to the pam stacks of sudo, su, etc. You can see the results with aureport -i --tty, and ausearch -i -m tty and ausearh -i -m user_tty. That should do everything you wanted.

Comment 8 Steve Grubb 2010-09-22 15:36:38 UTC
I think the feature being requested is met by the pam_tty_audit facility. If this is not the case, please reopen the bz and let me know what is missing from the pam_tty_audit facility or improvements to it. Thanks.