RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 617449 - Document behaviour of SSSD, SELinux and pam_mkhomedir
Summary: Document behaviour of SSSD, SELinux and pam_mkhomedir
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: Documentation
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: David O'Brien
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-23 04:41 UTC by David O'Brien
Modified: 2015-01-04 23:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 15:23:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David O'Brien 2010-07-23 04:41:07 UTC
Description of problem:

From sgallagh email to ipa-samba email list:

This is something that probably belongs in the SSSD documentation.

If your users in LDAP have home directories that are not in /home (e.g. my homedir at Red Hat is /home/bos/sgallagh) then if the system is configured for making home directories on first login, they will be created with the wrong permissions.

The following steps need to be taken (preemptively):
semanage fcontext -a -e /home /path/to/homedirs
and home directory creation should be performed with pam_oddjob_mkhomedir.so NOT pam_mkhomedir.so (the latter cannot create SELinux labels).  Authconfig will use pam_oddjob_mkhomedir.so if it is available when authconfig is run, otherwise it will default to pam_mkhomedir.so


If those steps didn't happen, the homedir can be brought into compliance by running the above semanage fcontext command and then running:
restorecon -R -v /path/to/homedirs

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 3 David O'Brien 2010-07-27 10:33:42 UTC
I've added all the info from here into a sub-section of Configuring PAM in the RHEL 6 Deployment Guide:

"16.2.3.2.2.1. Using Custom Home Directories with SSSD".

I'm hoping to get a bit more info on how to specify which PAM library to use, and also how to edit the PAM config file without it being overwritten by authconfig.

8e161a2..6fbbe42  master -> master

Comment 4 Stephen Gallagher 2010-07-27 11:16:50 UTC
Authconfig in RHEL6 will automatically prefer pam_oddjob_mkhomedir.so if its package is installed on the system. So to select this library, simply install the 'oddjob-mkhomedir' package and then re-run authconfig.

To answer your question about overwriting the PAM config directly (even though it's unrelated to the specific problem): Authconfig does not edit /etc/pam.d/system-auth and /etc/pam.d/password-auth directly. It instead edits /etc/pam.d/system-auth-ac and /etc/pam.d/password-auth-ac. By default on Fedora, /etc/pam.d/system-auth is a symlink to /etc/pam.d/system-auth-ac (ditto for password-auth-ac), so in order to prevent authconfig from overwriting PAM changes, all that needs to be done is to break the symlink (e.g. 'rm -f system-auth; cp system-auth-ac system-auth; <make manual changes to system-auth>')

Comment 5 David O'Brien 2010-07-28 03:28:40 UTC
c7c12af..206c302  master -> master

Comment 7 releng-rhel@redhat.com 2010-11-11 15:23:44 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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