Bug 701355 - useradd, usermod need /usr/sbin/semanage, but package doesn't require it
useradd, usermod need /usr/sbin/semanage, but package doesn't require it
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
14
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Vrabec
Fedora Extras Quality Assurance
: Reopened
: 720870 742339 (view as bug list)
Depends On:
Blocks: 720870
  Show dependency treegraph
 
Reported: 2011-05-02 13:13 EDT by Garrett Holmstrom
Modified: 2011-11-10 04:17 EST (History)
8 users (show)

See Also:
Fixed In Version: shadow-utils-4.1.4.2-13.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-08 21:40:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Garrett Holmstrom 2011-05-02 13:13:27 EDT
Description of problem:
When one invokes useradd or usermod with a -Z option the program calls /usr/sbin/semanage.  That file is part of the policycoreutils-python package, but the shadow-utils package doesn't require it.

Version-Release number of selected component (if applicable):
shadow-utils-4.1.4.2-11.fc14.x86_64

How reproducible:
Any time policycoreutils-python is not installed

Steps to Reproduce:
1. /usr/sbin/useradd -Z user_u newuser
  
Actual results:
Failed to exec '/usr/sbin/semanage'
useradd: warning: the user name newuser to user_u SELinux user mapping failed.

Expected results:
(no output)
Comment 1 Enrico Scholz 2011-05-02 14:41:47 EDT
please solve the issue without adding a 'Requires: policycoreutils-python'... 'shadow-utils' has only a low set of dependencies atm which would change with the new requirement.  '-Z' may be a neat feature but is not required for core functionality;  I suggest to keep things as-is until soft-dependencies (Suggests:, Recommends:) are implemented in rpm/yum and add policycoreutils-python to the default set of packages in comps.xml instead.
Comment 2 Fedora Update System 2011-06-29 11:00:16 EDT
shadow-utils-4.1.4.2-12.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/shadow-utils-4.1.4.2-12.fc15
Comment 3 Peter Vrabec 2011-06-29 11:05:12 EDT
sorry, but I agree with Enrico. I don't want to extend dependencies.

There are some changes that are relevant to this issue in shadow-utils-4.1.4.2-12.fc15 update:
* userdel option to remove Linux login <-> SELinux login mapping
* useradd special exit value if SELinux user mapping is invalid
* usermod special exit value if SELinux user mapping is invalid
Comment 4 Fedora Update System 2011-07-04 14:53:15 EDT
shadow-utils-4.1.4.2-12.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Chad 2011-07-12 10:59:20 EDT
In regards to the updated shadow-utils package.  After applying,
when adding the xguest package, the package fails to install:

+ semanage user -a -S targeted -P xguest -R xguest_r xguest_u
+ useradd -c Guest -Z xguest_u xguest
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
/usr/sbin/semanage: Linux User xguest does not exist
useradd: warning: the user name xguest to xguest_u SELinux user mapping failed.
+ semanage login -a -S targeted -s xguest_u xguest
/usr/sbin/semanage: Linux User xguest does not exist
+ semanage login -m -S targeted -s xguest_u xguest
/usr/sbin/semanage: Login mapping for xguest is not defined
+ exit 1
Comment 6 Daniel Walsh 2011-07-14 11:44:00 EDT
# useradd -c Dan1 -Z xguest_u dan1
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
/usr/sbin/semanage: Linux User dan1 does not exist
useradd: warning: the user name dan1 to xguest_u SELinux user mapping failed.

It seems to get most of the way through but never actually adds the user dan1.

shadow-utils-4.1.4.3-5.fc16.x86_64
Comment 7 Chad 2011-07-19 07:44:55 EDT
Any updates/progress to report?
Comment 8 Chad 2011-07-25 08:29:38 EDT
Any updates/progress to report?
Comment 9 Peter Vrabec 2011-08-02 08:15:06 EDT
fixed in:
shadow-utils-4.1.4.3-8.fc16
shadow-utils-4.1.4.3-8.fc17
Comment 10 Fedora Update System 2011-08-02 09:15:33 EDT
shadow-utils-4.1.4.2-13.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/shadow-utils-4.1.4.2-13.fc15
Comment 11 Fedora Update System 2011-08-02 22:31:50 EDT
Package shadow-utils-4.1.4.2-13.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing shadow-utils-4.1.4.2-13.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/shadow-utils-4.1.4.2-13.fc15
then log in and leave karma (feedback).
Comment 12 Fedora Update System 2011-08-08 21:40:37 EDT
shadow-utils-4.1.4.2-13.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Nicolas Chauvet (kwizart) 2011-08-22 14:08:27 EDT
*** Bug 720870 has been marked as a duplicate of this bug. ***
Comment 14 choufleur 2011-10-18 16:14:43 EDT
Package shadow-utils-4.1.4.2-13.fc15 still does not fix the issue for me.

rpm -q shadow-utils           
shadow-utils-4.1.4.2-13.fc15.x86_64

yum install xguest 
gave
Error in PREIN scriptlet in rpm package
Comment 15 Peter Vrabec 2011-11-10 04:17:02 EST
*** Bug 742339 has been marked as a duplicate of this bug. ***

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