Bug 808526

Summary: useradd cannot open /etc/group
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-17 11:23:17 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 Richard W.M. Jones 2012-03-30 15:38:17 UTC
Description of problem:

# getenforce 
Enforcing
# groupadd -g 1001 testaccount
# useradd -u 1001 -g 1001 -m testaccount
useradd: cannot open /etc/group
# setenforce Permissive
# useradd -u 1001 -g 1001 -m testaccount
# rpm -qf /usr/sbin/useradd
shadow-utils-4.1.5-2.fc18.x86_64
# ls -lZ /etc/group*
-rw-r--r--. root root system_u:object_r:etc_t:s0       /etc/group
-rw-r--r--. root root system_u:object_r:passwd_file_t:s0 /etc/group-
# ls -lZ /etc/passwd*
-rw-r--r--. root root system_u:object_r:etc_t:s0       /etc/passwd
-rw-r--r--. root root system_u:object_r:passwd_file_t:s0 /etc/passwd-
-rw-r--r--. root root system_u:object_r:etc_t:s0       /etc/passwdqc.conf

Version-Release number of selected component (if applicable):

* selinux-policy-3.10.0-104.fc17.noarch

How reproducible:

* Once.

Additional info:

This is an original F16 virtual machine which was updated
to F17 + Rawhide using the instructions here:

https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_16_-.3E_Fedora_17

Comment 1 Daniel Walsh 2012-03-30 16:43:52 UTC
restorecon -R -v /etc

Should fix.

Miroslav, maybe we need to do.

restorecon /etc/group /etc/passwd in post install.

Comment 2 Miroslav Grepl 2012-03-30 16:51:40 UTC
Probably yes to avoid these issues.

Comment 3 Richard W.M. Jones 2012-12-15 19:18:46 UTC
So it's fixed?  In which case the resolution should be CURRENTRELEASE.

Or you won't fix it, in which case the resolution should be WONTFIX.

Comment 4 Miroslav Grepl 2012-12-17 11:17:46 UTC
We added some fixes to F17/F18 to make this working to fix this issue.

You are right, it should be closed as CURRENTRELEASE.