Commit 4201db1e authored by David Johnson's avatar David Johnson

Ensure ~ubuntu homedir and .ssh is sane, for sshd.

parent 45aea4eb
Pipeline #1273 skipped
...@@ -260,6 +260,10 @@ EOF ...@@ -260,6 +260,10 @@ EOF
chmod 600 $MNT/home/ubuntu/.ssh/authorized_keys chmod 600 $MNT/home/ubuntu/.ssh/authorized_keys
cat /root/.ssh/id_rsa.pub >> $MNT/home/ubuntu/.ssh/authorized_keys cat /root/.ssh/id_rsa.pub >> $MNT/home/ubuntu/.ssh/authorized_keys
# Make sure ubuntu user's homedir and .ssh is sane. Do everything cause
# we just copied in a bunch of stuff as root.
chown 1000:1000 -R $MNT/home/ubuntu
rm -f $MNT/etc/resolv.conf rm -f $MNT/etc/resolv.conf
ln -s ../run/resolvconf/resolv.conf $MNT/etc/resolv.conf ln -s ../run/resolvconf/resolv.conf $MNT/etc/resolv.conf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment