Project

General

Profile

Actions

Bug #27109

closed

sshd-keygen utility has the wrong file path on freeipa_register snippet for RHEL8

Added by Marek Hulán almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
TFTP
Target version:
-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1721878

Description of problem:

Refering to bugzilla 1720632 , sshd-keygen utility has the wrong file path on freeipa_register snippet for RHEL7 or RHEL8 (any major > 6):

/usr/sbin/sshd-keygen

This path is right for RHEL7 but for RHEL8 , it should be :

/usr/libexec/openssh/sshd-keygen

This leads to the following error during the provisioning if realm is activated.

/tmp/ks-script-q_ct_py2: line 121: /usr/sbin/sshd-keygen: No such file or directory

stderr=Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

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

Satellite 6.5
RHEL8

How reproducible:
100%

Steps to Reproduce:
1. Enable the realm for the new provisioning machine.
2. Provision a new RHEL8 machine.

Actual results:
Failed to generate SSH keys.

/tmp/ks-script-q_ct_py2: line 121: /usr/sbin/sshd-keygen: No such file or directory

stderr=Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

Expected results:
Generating the SSH keys without issues.

Additional info:

A workaround has been applied to temporarily fix the issue by adding one more check :

<% if @host.operatingsystem.major.to_i > 6 ->
<
if @host.operatingsystem.major.to_i == 7 ->
/usr/sbin/sshd-keygen
<
else ->
/usr/libexec/openssh/sshd-keygen
<
end ->
<
end -%>

Actions #1

Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/community-templates/pull/590 added
Actions #2

Updated by Marek Hulán almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #3

Updated by Marek Hulán almost 5 years ago

  • Subject changed from sshd-keygen utility has the wrong file path on freeipa_register snippet for RHEL8 to sshd-keygen utility has the wrong file path on freeipa_register snippet for RHEL8
  • Status changed from Closed to Assigned

needs templates sync to core

Actions #4

Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6865 added
Actions #5

Updated by Marek Hulán almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by The Foreman Bot over 4 years ago

  • Pull request https://github.com/theforeman/community-templates/pull/627 added
Actions

Also available in: Atom PDF