Bug 835599 - can not use usernames for field rules (auditctl -F uid=...)
Summary: can not use usernames for field rules (auditctl -F uid=...)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: audit
Version: 18
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-26 14:49 UTC by Cristian Ciupitu
Modified: 2013-12-21 13:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-21 13:47:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Cristian Ciupitu 2012-06-26 14:49:29 UTC
Description of problem:
The auditctl man page says the following about field rules:

    uid   User ID. May be numeric or the user account name.

yet, I can use the name, it works only with the number.

Version-Release number of selected component (if applicable):
audit-2.2.1-1.fc17.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. auditctl -a exit,always -F arch=b64 -S lstat -F uid=superuser
  
Actual results:
Unknown user: superuser
-F unknown field: uid

Expected results:
No error.

Additional info:
auditctl -a exit,always -F arch=b64 -S lstat -F uid=1002 # works fine

Comment 1 Steve Grubb 2012-07-06 18:07:22 UTC
Does superuser exist on that machine? Auditctl takes the name supplied and calls getpwnam. So, if its failing to convert the text, then something is wrong in the user name lookup. About the only thing that can go wrong is that the user account is missing. It works fine on my machine.

Comment 2 Cristian Ciupitu 2012-07-07 05:48:31 UTC
[root@hermes ~]# id superuser
uid=1002(superuser) gid=1002(superuser) groups=1002(superuser)
[root@hermes ~]# auditctl -a exit,always -F arch=b64 -S lstat -F uid=superuser
Unknown user: superuser
-F unknown field: uid

Comment 3 Steve Grubb 2013-05-09 16:14:29 UTC
Is your user database in /etc/password or sssd or ldap or something else?

Comment 4 Cristian Ciupitu 2013-05-09 20:24:02 UTC
I was using passwd i.e. /etc/nsswitch.conf looked like this:

    passwd:     files
    shadow:     files
    group:      files

Comment 5 Fedora End Of Life 2013-07-04 03:22:04 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Cristian Ciupitu 2013-07-04 17:39:13 UTC
It's still happening in Fedora 18, audit-2.3.1-2.fc18.x86_64.

Comment 7 Fedora End Of Life 2013-12-21 08:38:41 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Cristian Ciupitu 2013-12-21 13:47:21 UTC
Seems to be fixed in audit-2.3.2-1.fc20.x86_64.


Note You need to log in before you can comment on or make changes to this bug.