summaryrefslogtreecommitdiffstats
path: root/tools/ubuntu-server-cloudimg-modify.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ubuntu-server-cloudimg-modify.sh')
-rwxr-xr-xtools/ubuntu-server-cloudimg-modify.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/ubuntu-server-cloudimg-modify.sh b/tools/ubuntu-server-cloudimg-modify.sh
index 11e6051cd..78bf098dc 100755
--- a/tools/ubuntu-server-cloudimg-modify.sh
+++ b/tools/ubuntu-server-cloudimg-modify.sh
@@ -35,8 +35,12 @@ grep trusty /etc/apt/sources.list && \
echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
# Add hostname to /etc/hosts.
+# Allow console access via pwd
cat <<EOF >/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg
manage_etc_hosts: True
+password: RANDOM
+chpasswd: { expire: False }
+ssh_pwauth: True
EOF
apt-get update