Bug 1575771

Summary: ksu doesn't properly log auth failures
Product: [Fedora] Fedora Reporter: Robbie Harwood <rharwood>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 28CC: abokovoy, csieh, dpal, j, misterbonnie, nalin, npmccallum, pasik, pkis, qe-baseos-security, rharwood, riehecky, sbose, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/krb5/krb5/pull/776
Whiteboard:
Fixed In Version: krb5-1.16.1-3.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1270927 Environment:
Last Closed: 2018-06-04 13:17:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1270927    

Description Robbie Harwood 2018-05-07 21:06:06 UTC
+++ This bug was initially created as a clone of Bug #1270927 +++

Description of problem:
I'm looking to switch from sudo to .k5users, but the logging is reduced
by comparison.

For example:
sudo: riehecky : TTY=pts/2 ; PWD=/home/riehecky ; USER=root ;
COMMAND=/bin/ls -a
vs
ksu[15242]: pam_unix(ksu:session): session opened for user root by
riehecky(uid=1000)

Can the logging be increased so that the command and its arguments is
logged?

Version-Release number of selected component (if applicable):krb5-1.12.2-15.el7_1


How reproducible:100%


Steps to Reproduce:
1.grant 'someuser' sudo rights to run /bin/ls
2.echo 'someuser /bin/ls' /root/.k5users
3.sudo /bin/ls
4.ksu -e /bin/ls

Actual results:
sudo logs command executed
ksu logs as though the user acquired a full shell

Expected results:
ksu log action performed in a similar manner to sudo

Additional info:
http://krbdev.mit.edu/rt/Ticket/Display.html?id=8270

--- Additional comment from Robbie Harwood on 2018-05-07 17:03:38 EDT ---

I definitely see the non-root success:

may 07 14:50:16 freeipa.rharwood.biz ksu[1769]: 'ksu left' authenticated right for right on /dev/pts/0
may 07 14:50:16 freeipa.rharwood.biz ksu[1769]: Account left: authorization for right for execution of /bin/ls successful

Failures for non-root users (regardless of whether they're running a command, or their target user) don't seem to show up.

Let me see what I can do.

Comment 1 Fedora Update System 2018-06-01 18:36:34 UTC
krb5-1.16.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-51342314fa

Comment 2 Fedora Update System 2018-06-02 22:33:51 UTC
krb5-1.16.1-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-51342314fa

Comment 3 Fedora Update System 2018-06-04 13:17:02 UTC
krb5-1.16.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.