Bug 701355 - useradd, usermod need /usr/sbin/semanage, but package doesn't require it
Summary: useradd, usermod need /usr/sbin/semanage, but package doesn't require it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 720870 742339 (view as bug list)
Depends On:
Blocks: 720870
TreeView+ depends on / blocked
 
Reported: 2011-05-02 17:13 UTC by Garrett Holmstrom
Modified: 2011-11-10 09:17 UTC (History)
8 users (show)

Fixed In Version: shadow-utils-4.1.4.2-13.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-09 01:40:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Garrett Holmstrom 2011-05-02 17:13:27 UTC
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 18:41:47 UTC
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 15:00:16 UTC
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 15:05:12 UTC
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 18:53:15 UTC
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 14:59:20 UTC
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 15:44:00 UTC
# 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 11:44:55 UTC
Any updates/progress to report?

Comment 8 Chad 2011-07-25 12:29:38 UTC
Any updates/progress to report?

Comment 9 Peter Vrabec 2011-08-02 12:15:06 UTC
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 13:15:33 UTC
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-03 02:31:50 UTC
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-09 01:40:37 UTC
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 18:08:27 UTC
*** Bug 720870 has been marked as a duplicate of this bug. ***

Comment 14 choufleur 2011-10-18 20:14:43 UTC
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 09:17:02 UTC
*** 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.