Bug 496013 - /root/.ssh/authorized_keys not created with proper type
/root/.ssh/authorized_keys not created with proper type
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-15 19:49 EDT by Dax Kelson
Modified: 2009-05-01 14:05 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-01 14:05:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dax Kelson 2009-04-15 19:49:28 EDT
Description of problem:

I installed a rawhide box today (April 15th, 2009), I installed a authorized_keys file to /root/.ssh/authorized_keys and key based SSH authentication wouldn't work.

My installation procedure was:

(/root/.ssh/ directory already existed on the rawhide box)

anotherbox# cd /root/.ssh/
anotherbox# scp authorized_keys rawhidebox:.ssh/

Over on rawhide box here are the permissions and selinux type on the file:

[root@rawhidebox .ssh]# ls -alZ
drwx------. root root unconfined_u:object_r:admin_home_t:s0 .
drwxr-x---. root root system_u:object_r:admin_home_t:s0 ..
-rw-------. root root unconfined_u:object_r:admin_home_t:s0 authorized_keys
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 known_hosts
[root@rawhidebox .ssh]# 

Note that 'admin_home_t' on authorized_keys.

I'm unable to use key based auth until I run restorecon the authorized_keys file (which sets it to home_ssh_t).

Using scp to install an authorized_keys file is very typical. This needs to work.
Comment 1 Daniel Walsh 2009-05-01 14:05:25 EDT
Fixed in selinux-policy-3.6.12-23.fc11.noarch

Run restorecon -R -v /root after you create the directory or run restorecond

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