Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1331862

Summary: remote_execution_ssh_keys mislabels /root/.ssh/authorized_keys on RHEL6
Product: Red Hat Satellite Reporter: Maxim Burgerhout <mburgerh>
Component: Remote ExecutionAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bkearney, egolov, jalviso, jbhatia, kbidarka, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14899
Whiteboard:
Fixed In Version: foreman-1.11.0.28-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:30:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Maxim Burgerhout 2016-04-29 20:42:45 UTC
Description of problem:
It seems that only on RHEL6, the SELinux context for the /root/.ssh/authorized_keys file on newly provisioned machines is set to admin_home_t, which is wrong.

This breaks REX for me on new RHEL6 machines. A restorecon on that file reset the context to ssh_home_t and then it works.

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

How reproducible:


Steps to Reproduce:
1. Provision new RHEL6 machine
2. Try and run a job
3.

Actual results:
Job fails, ausearch -sv no shows SELinux denial, label of /root/.ssh/authorized_keys is set to admin_home_t.

Expected results:
Job succeeds, label is set to ssh_home_t

Additional info:
RHEL5 and RHEL7 seem to work fine out of the box. I'm not sure the remote_execution_ssh_keys is at fault here, but the fact is that - for me at least - the mislabeling does break REX.

Comment 2 Stephen Benjamin 2016-05-02 12:27:27 UTC
Created redmine issue http://projects.theforeman.org/issues/14899 from this bug

Comment 3 Bryan Kearney 2016-05-11 22:15:50 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14899 has been closed

Comment 4 Kedar Bidarkar 2016-06-03 18:18:26 UTC
[root@kbrhel68too ~]# ll -Z /root/.ssh/authorized_keys
-rw-------. root root system_u:object_r:ssh_home_t:s0  /root/.ssh/authorized_keys

~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)


VERIFIED with sat62-snap(GA)-14.1

Comment 5 Ivan Necas 2016-06-13 18:04:43 UTC
*** Bug 1344185 has been marked as a duplicate of this bug. ***

Comment 6 Bryan Kearney 2016-07-27 11:30:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501