Unverified Commit be529ca1 authored by David Beniamine's avatar David Beniamine
Browse files

Get cifs secrets from server at post_install

parent 3da44a0e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ sed -i -e 's/lametro.fr/perdu.com/' /etc/conky/conky.conf
echo "Récupération de la clef ssh du serveur"
tftp ecole-dc <<'EOF'
get id_rsa.pub
get secret.tgz
quit
EOF
sshdir="/root/.ssh/"
@@ -38,6 +39,15 @@ mkdir -p $sshdir
mv id_rsa.pub $sshdir/authorized_keys
chown -R root:root $sshdir

mkdir -p /etc/cifs/secrets
mv secret.tgz
cd /etc/cifs/secrets
tar xvzf secret.tgz
rm secret.tgz
chown -R root:root /etc/cifs
cd


hostn=`hostname`
echo "Veuillez entrer le numéro de poste"
read numero