Bug 1457918 - SELinux error while trying to create a new user
Summary: SELinux error while trying to create a new user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-01 14:15 UTC by Shakhar Dasgupta
Modified: 2017-06-12 13:05 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-257.fc26
Clone Of:
Environment:
Last Closed: 2017-06-12 13:05:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Shakhar Dasgupta 2017-06-01 14:15:14 UTC
Description of problem:


Fedora 26 Beta 1.4 Workstation


How reproducible:


Steps to Reproduce:
1. Go to Settings -> Users
2. Unlock using root password
3. Create new user

Actual results:
SELinux notifies "SELinux is preventing useradd from using the net_admin capability". However, the new user account seems to work fine (not really sure when the net_admin capability is required).

Expected results:
No notification from SELinux.

Error Log:
--------------------------------------------------------------------------------
SELinux is preventing useradd from using the net_admin capability.

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

If you believe that useradd should have the net_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:
# ausearch -c 'useradd' --raw | audit2allow -M my-useradd
# semodule -X 300 -i my-useradd.pp

Additional Information:
Source Context                system_u:system_r:useradd_t:s0
Target Context                system_u:system_r:useradd_t:s0
Target Objects                Unknown [ capability ]
Source                        useradd
Source Path                   useradd
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages          
Target RPM Packages          
Policy RPM                    selinux-policy-3.13.1-251.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost-live
Platform                      Linux localhost-live 4.11.0-2.fc26.x86_64 #1 SMP
                              Tue May 9 15:24:49 UTC 2017 x86_64 x86_64
Alert Count                   14
First Seen                    2017-06-01 04:13:56 EDT
Last Seen                     2017-06-01 04:13:56 EDT
Local ID                      24e05744-a44a-4e10-86f8-5e915802562a

Raw Audit Messages
type=AVC msg=audit(1496304836.749:254): avc:  denied  { net_admin } for  pid=2300 comm="useradd" capability=12  scontext=system_u:system_r:useradd_t:s0 tcontext=system_u:system_r:useradd_t:s0 tclass=capability permissive=0


Hash: useradd,useradd_t,useradd_t,capability,net_admin
--------------------------------------------------------------------------------

Comment 1 Daniel Walsh 2017-06-01 18:25:36 UTC
It is definitely not required.  This should be dontaudited, but most likely a slight kernel issue.

Comment 2 Fedora Update System 2017-06-08 11:09:24 UTC
selinux-policy-3.13.1-257.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a43388229

Comment 3 Fedora Update System 2017-06-10 01:09:25 UTC
selinux-policy-3.13.1-257.fc26 has been pushed to the Fedora 26 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-2017-6a43388229

Comment 4 Fedora Update System 2017-06-12 13:05:21 UTC
selinux-policy-3.13.1-257.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


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