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 621365 - oddjob-mkhomedir does not create homedir w/ NIS password
Summary: oddjob-mkhomedir does not create homedir w/ NIS password
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 625455
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-04 20:38 UTC by Rik van Riel
Modified: 2012-10-15 15:10 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.7.19-36.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:36:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rik van Riel 2010-08-04 20:38:19 UTC
Description of problem:

I selected "create new home directory on login" for a virtual test machine. I use this together with NIS passwords here at home.

On logging in, no home directory gets created, and I find the following oddjob-mkhomedir error message in /var/log/messages:

Aug  4 16:28:29 doriath oddjob-mkhomedir[2062]: could not look up location of home directory for riel

# ypcat passwd
riel:<snip>:500:500:Rik van Riel:/home/riel:/bin/bash

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

oddjob-mkhomedir-0.30-1.el6.x86_64

Steps to Reproduce:
1. install RHEL6
2. select NIS passwords
3. select "create new home directory on login"
4. try to log in
  
Actual results:

No home directory is created.

Expected results:

Home directory is created.

Comment 1 Rik van Riel 2010-08-04 20:39:56 UTC
# ypmatch riel passwd
riel:<snip>:500:500:Rik van Riel:/home/riel:/bin/bash

Comment 3 Nalin Dahyabhai 2010-08-04 20:56:23 UTC
A privileged NIS client is expected to issue requests from a source port below
1024 as a way of letting an NIS server know that it's privileged.  This can be
used for access control at the server.

Dan, based on our out-of-band conversation, I think we need to be letting
confined processes which are allowed to be NIS clients bind to ports in this
range (and connect to them, as that's usually where the servers are).

For reference, the dontaudit denials I get when I turn on logging for them:

type=AVC msg=audit(1280954860.258:50): avc:  denied  { name_connect } for 
pid=7464 comm="mkhomedir" dest=700
scontext=unconfined_u:unconfined_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=tcp_socket

type=AVC msg=audit(1280954860.255:49): avc:  denied  { name_bind } for 
pid=7464 comm="mkhomedir" src=856
scontext=unconfined_u:unconfined_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=tcp_socket

Comment 4 Nalin Dahyabhai 2010-08-04 21:05:42 UTC
Just to avoid misunderstandings, NIS can use either UDP or TCP, so I think we need to allow this for both UDP and TCP.

Comment 5 RHEL Program Management 2010-08-04 21:07:36 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 6 Rik van Riel 2010-08-04 21:37:44 UTC
I have confirmed that this is indeed an selinux problem.

Running "setenforce 0" and then logging in causes my home directory to be created.

Comment 7 Daniel Walsh 2010-08-05 19:15:12 UTC
Miroslav grab the `nis_use_ypbind_uncond' from rawhide.

Comment 8 Miroslav Grepl 2010-08-06 13:15:36 UTC
Fixed in selinux-policy-3.7.19-36.el6.noarch.

Comment 12 releng-rhel@redhat.com 2010-11-10 21:36:00 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.