Red Hat Bugzilla – Bug 742339
useradd -Z broken
Last modified: 2011-11-10 04:17:02 EST
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):
useradd -Z staff_u joe
Steps to Reproduce:
1. useradd -Z staff_u joe
/usr/sbin/semanage: Linux User joe does not exist
useradd: warning: the user name joe to staff_u SELinux user mapping failed.
It looks like an useradd issue.
Yes I know this issue was fixed somewhere. Basically libsemanage is verifying the user exists before the user is added to /etc/passwd.
*** This bug has been marked as a duplicate of bug 701355 ***