Bug 14969 - ltsp-update-sshkeys don't update sshkeys in client chroot
Summary: ltsp-update-sshkeys don't update sshkeys in client chroot
Status: CLOSED WONTFIX
Alias: None
Product: Branch 4.0
Classification: Distributions
Component: ltsp5-server (show other bugs)
Version: 4.0
Hardware: all Linux
: P2 normal
Assignee: Nobody's working on this, feel free to take it
QA Contact: Q.A. 4.0
URL:
Keywords:
Depends on:
Blocks: 15333
  Show dependency tree
 
Reported: 2008-03-18 12:06 MSK by Mike
Modified: 2014-11-05 20:16 MSK (History)
1 user (show)

See Also:


Attachments
Patch for ltsp-update-sshkeys utility (1.47 KB, patch)
2008-03-18 14:28 MSK, Mike
no flags Details | Diff
full patch (1.62 KB, patch)
2008-03-18 16:08 MSK, Mike
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2008-03-18 12:06:05 MSK
ltsp-update-sshkeys in ltsp5-server-5.0-alt0.71 is not ported (path to sshd
config  directory is incorrect).

Patch to the current utility:
@@ -1,6 +1,6 @@
 #!/bin/sh

-test -z "$clients" && clients=$(find /opt/ltsp/. -mindepth 1 -maxdepth 1 -type
d 2>/dev/null)
+test -z "$clients" && clients=$(find /var/lib/ltsp5 -mindepth 1 -maxdepth 1
-type d 2>/dev/null)
 hostname=$(hostname)
 ips=$(ip -o addr show | awk '$3 == "inet" && $4 !~ /^127\./ { print $4 }' | sed
-e 's,/[0-9][0-9]*\>,,g')
 output=$(mktemp -t $(basename $0)-output.XXXXXXXX)
@@ -17,8 +17,8 @@

 for name in $names; do
     for encryption in $enc; do
-               if [ -f /etc/ssh/ssh_host_${encryption}_key.pub ]; then
-                       echo $(echo $name $(cat
/etc/ssh/ssh_host_${encryption}_key.pub|awk '{split ($0, a, " "); print a[1]"
"a[2]" "}')) >> $output
+               if [ -f /etc/openssh/ssh_host_${encryption}_key.pub ]; then
+                       echo $(echo $name $(cat
/etc/openssh/ssh_host_${encryption}_key.pub|awk '{split ($0, a, " "); print
a[1]" "a[2]" "}')) >> $output
                        logger -f $logfile -t ltsp "# Creating
${encryption}-hostkey for $name"
                else
                        logger -f $logfile -t ltsp "No ${encryption} key found
for ${name}, please configure your ssh server correctly"
@@ -31,8 +31,8 @@
 fi

 for client in $clients; do
-    if [ -d $client/etc/ssh ]; then
-        install -m 644 $output $client/etc/ssh/ssh_known_hosts
+    if [ -d $client/etc/openssh ]; then
+        install -m 644 $output $client/etc/openssh/ssh_known_hosts
     else
         echo "WARNING: $client/etc/ssh not found. skipping..."
     fi

Steps to Reproduce:
Try to run ltsp-update-sshkeys and you will see in logs, that no ssh keys are
updated.
Actual Results:  
Can't update ssh keys
Comment 1 led 2008-03-18 12:24:15 MSK
Используйте "Create a New Attachment", пожалуйста
Comment 2 Mike 2008-03-18 14:28:35 MSK
Created attachment 2506 [details]
Patch for ltsp-update-sshkeys utility
Comment 3 Mike 2008-03-18 16:08:49 MSK
Created attachment 2507 [details]
full patch

patch from basic ltsp-update-sshkeys to work version
Comment 4 Michael Shigorin 2014-11-05 20:16:06 MSK
В 4.0/branch исправления не будут вноситься уже технически (заглушена очередь на сборку), поэтому прошу ошибки, актуальные для sisyphus/p7/t7, перевесить на текущие ветки или сизиф.