Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1018763

Summary: SELinux is preventing /usr/bin/passwd from using the 'sys_admin' capabilities.
Product: Red Hat Enterprise Linux 7 Reporter: Martin <mholec>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jcpunk, mtruneck, tpelka
Target Milestone: beta   
Target Release: 7.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8ebef673e8d999307f159040ae195831b574b2bf4ad3284f7fdf4848da326a79
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-03 16:46:03 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 Martin 2013-10-14 11:42:30 UTC
Description of problem:
Description of problem:
Testing  Multiple Graphical Login

1.    Install RHEL desktop on multiple virtual or bare metal machines.
2.    Edit the /etc/dconf/profile/user file on every client. If one does not already exist, create it.
3.    Add a line containing service-db:keyfile/user to the file and save your changes.
4.    Setup shared /home directory via NFS on each machine. Put the following line into /etc/fstab
    nest.test.redhat.com:/mnt/qa/scratch/rhel7-gnome-shell-shared-home  /home  nfs  rw  0 0
5.    Create account with username "test" and password "redhat".
6.    Login to Gnome.
SELinux is preventing /usr/bin/passwd from using the 'sys_admin' capabilities.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that passwd should have the sys_admin capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep passwd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023
Target Context                unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023
Target Objects                 [ capability ]
Source                        passwd
Source Path                   /usr/bin/passwd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           passwd-0.79-1.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-86.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-33.el7.x86_64 #1 SMP Fri
                              Oct 4 11:13:14 EDT 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-10-10 14:57:03 BST
Last Seen                     2013-10-10 14:57:03 BST
Local ID                      782db1b1-f3be-49dc-b25f-9c84af8a36e0

Raw Audit Messages
type=AVC msg=audit(1381413423.732:530): avc:  denied  { sys_admin } for  pid=2513 comm="passwd" capability=21  scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tclass=capability


type=SYSCALL msg=audit(1381413423.732:530): arch=x86_64 syscall=write success=yes exit=EPERM a0=2 a1=7fe9cadc3243 a2=1 a3=0 items=0 ppid=1849 pid=2513 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty2 ses=2 comm=passwd exe=/usr/bin/passwd subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 key=(null)

Hash: passwd,passwd_t,passwd_t,capability,sys_admin

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.10.0-33.el7.x86_64
type:           libreport

Comment 2 Miroslav Grepl 2013-10-16 08:40:53 UTC
Martin,
if you allow booleans from previous bugs, are you able reproduce this sys_admin capability AVC?

Comment 3 Martin 2013-12-16 13:49:18 UTC
(In reply to Miroslav Grepl from comment #2)
> Martin,
> if you allow booleans from previous bugs, are you able reproduce this
> sys_admin capability AVC?

No I haven't reproduced this problem since setting: "setsebool -P use_nfs_home_dirs 1".

Comment 4 Michal Trunecka 2014-01-03 10:08:16 UTC
So, is this a notabug?

Comment 5 Martin 2014-01-03 16:46:03 UTC
It's not a bug, it's a feature!