From 2625373a061637295a52d1553d440c3416266f1f Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Fri, 26 Sep 2008 18:00:59 +0000 Subject: * add import for stage 1 rsa keys git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2253 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/dropbear/XX_dropbear.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'os-plugins/plugins') diff --git a/os-plugins/plugins/dropbear/XX_dropbear.sh b/os-plugins/plugins/dropbear/XX_dropbear.sh index 28b9dbb1..b244cf5c 100644 --- a/os-plugins/plugins/dropbear/XX_dropbear.sh +++ b/os-plugins/plugins/dropbear/XX_dropbear.sh @@ -29,9 +29,19 @@ if [ -e /initramfs/plugin-conf/dropbear.conf ]; then # create dropbear config dir mkdir -p /etc/dropbear - + + # touch some files to get rid of error msgs + touch /var/log/lastlog + touch /var/log/wtmp + + # copy ssh auth keys from stage1 + cp -r /mnt/root/.ssh /root + + # give root a valid shell + sed -i /etc/passwd -e "s/bash/sh/" + # convert openssh rsa key to dropbear key - if available - if [ -e /mnt/etc/ssh/ssh_host_rsa_key ] + if [ -e /mnt/etc/ssh/ssh_host_rsa_key ]; then dropbearconvert openssh dropbear /mnt/etc/ssh/ssh_host_rsa_key \ /etc/dropbear/dropbear_rsa_host_key else -- cgit v1.2.3-55-g7522