Bug 1008922

Summary: 4.4.3. Configuring Servers for Enhanced Entitlements Reporting - Step 4. add restorecon step
Product: Red Hat Satellite 5 Reporter: Rich Jerrido <rjerrido>
Component: Docs Installation GuideAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact: Dan Macpherson <dmacpher>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 560CC: cperry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-11 10:45:26 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:
Bug Depends On:    
Bug Blocks: 924180    

Description Rich Jerrido 2013-09-17 10:51:22 UTC
Description of problem:

When following the documentation, in step 4, the user is told to run:

[root@sat56] # useradd swreport
[root@sat56] # mkdir /home/swreport/.ssh

This results in /home/swreport/.ssh having an incorrect SELinux context (which will prevent public key auth from working). See below. 

#ls -lZa /home/swreport/
drwx------. swreport swreport unconfined_u:object_r:user_home_dir_t:s0 ./
drwxr-xr-x. root     root     system_u:object_r:home_root_t:s0 ../
drwxr-xr-x. root     root     unconfined_u:object_r:user_home_t:s0 .ssh/

Expected results:

In step 7, we'd need to add a step to have the user run 'restorecon -R /home/swreport/.ssh'

Comment 2 Clifford Perry 2013-10-11 10:45:26 UTC
https://access.redhat.com/site/documentation/en-US/Red_Hat_Satellite/5.6/html-single/Installation_Guide/index.html

Step 7 now reads:

 Set permissions and the SELinux content on the .ssh directory and authorized_keys file for the swreport user.

[root@sat56] # chown -R swreport:swreport /home/swreport/.ssh
[root@sat56] # chmod 700 /home/swreport/.ssh
[root@sat56] # chmod 600 /home/swreport/.ssh/authorized_keys
[root@sat56] # restorecon -R /home/swreport/.ssh