Bug 235986 - kdump propagate create authorized_keys2 with 664 permission
kdump propagate create authorized_keys2 with 664 permission
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Neil Horman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-11 04:28 EDT by masanari iida
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2007-0548
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 13:02:58 EST
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 masanari iida 2007-04-11 04:28:19 EDT
Description of problem:
When I configure kdump with scp, I execute "service kdump propagate".
It succesfully propagate key into ~/.ssh/authorized_keys2 file.
But the file permission is not properly changed to 600.
So I failed to start "service kdump start" in the next step.

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

# rpm -qa |grep kexec
kexec-tools-1.101-164.el5


How reproducible:
Always when I configure kdump with scp.


Steps to Reproduce:
1. Configure /etc/kdump.conf  as  kdump with scp.
2. Create an account on kdump scp destination box.
3. Execute    # service kdump propagate 

  
Actual results:
kdump script create ~/.ssh/authorized_keys2 file with permission 664.

# ls -l
total 4
-rw-rw-r--  1 kdump kdump 408 Apr 11 17:00 authorized_keys2


In /var/log/secure, when I start "service kdump start"
Apr 11 16:41:52 abc123 sshd[12083]: Authentication refused: bad ownership or
modes for file /home/kdump/.ssh/authorized_keys2


Expected results:
kdump script create ~/.ssh/authorized_keys2 file with permission 600.
# ls -l
total 4
-rw-------  1 kdump kdump 408 Apr 11 17:03 authorized_keys2


Additional info:

Following line in /etc/init.d/kdump cause the problem.

        cat $KEYFILE | ssh -x $SSH_USER@$SSH_SERVER "mkdir -p ~$SSH_USER/.ssh;
chmod 700 ~$SSH_USER/.ssh;  cat >> ~$SSH_USER/.ssh/authorized_keys2"


Fix.
        cat $KEYFILE | ssh -x $SSH_USER@$SSH_SERVER "mkdir -p ~$SSH_USER/.ssh;
chmod 700 ~$SSH_USER/.ssh;  cat >> ~$SSH_USER/.ssh/authorized_keys2; chmod 600
~$SSH_USER/.ssh/authorized_keys2"
Comment 1 Neil Horman 2007-04-11 09:32:58 EDT
sounds reasonable.  If I can have a pm/qe ack on this I would appreciate it.
Comment 2 RHEL Product and Program Management 2007-04-11 09:43:26 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 Neil Horman 2007-05-08 11:28:08 EDT
fixed in -171.el5.  Thanks!
Comment 8 errata-xmlrpc 2007-11-07 13:02:58 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0548.html

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