Bug 742339

Summary: useradd -Z broken
Product: [Fedora] Fedora Reporter: Dominick Grift <dominick.grift>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dwalsh, mgrepl, pvrabec, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-10 09:17:02 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 Dominick Grift 2011-09-29 19:00:12 UTC
Description of problem:
When i run useradd -Z staff_u domg472:

/usr/sbin/semanage: Linux User domg472 does not exist
useradd: warning: the user name domg472 to staff_u SELinux user mapping failed.

I end up without a Linux user, but with a home dir and mail spool for that to be created Linux user.

Version-Release number of selected component (if applicable):
libsemanage-python-2.1.2-1.fc16.x86_64
libsemanage-2.1.2-1.fc16.x86_64
shadow-utils-4.1.4.3-7.fc16.x86_64

How reproducible:
useradd -Z staff_u joe

Steps to Reproduce:
1. useradd -Z staff_u joe
2.
3.
  
Actual results:
/usr/sbin/semanage: Linux User joe does not exist
useradd: warning: the user name joe to staff_u SELinux user mapping failed.

Comment 1 Miroslav Grepl 2011-09-30 06:22:20 UTC
It looks like an useradd issue.

Comment 2 Daniel Walsh 2011-09-30 14:45:00 UTC
Yes I know this issue was fixed somewhere.  Basically libsemanage is verifying the user exists before the user is added to /etc/passwd.

Comment 3 Peter Vrabec 2011-11-10 09:17:02 UTC

*** This bug has been marked as a duplicate of bug 701355 ***