Bug #27109
closedsshd-keygen utility has the wrong file path on freeipa_register snippet for RHEL8
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 -%>
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
Updated by Marek Hulán almost 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset community-templates|948eae6d44d58b5c4d9010a1374c70ef0061ce8a.
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
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
Updated by Marek Hulán almost 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset af5bbe9fc3a4b41e09a71056a49c5701de3eb4f9.
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/theforeman/community-templates/pull/627 added