octavia/elements/root-passwd/post-install.d/99-setup
Michael Johnson 9df9ff9137 Add Amphora base image creation scripts for Octavia
Implements: blueprint base-image

Change-Id: I3e72db6d2f19fe45138758eb0821e27aa1c2542a
2014-12-11 01:31:19 +00:00

12 lines
487 B
Bash
Executable File

#!/bin/bash
if [ -z "$DIB_PASSWORD" ]; then
echo "Error during setup password for root"
exit 1
fi
sed -i "s/disable_root: true/disable_root: false/" /etc/cloud/cloud.cfg
install-packages augeas-tools openssh-server openssh-client
augtool -s set /files/etc/ssh/sshd_config/PasswordAuthentication yes
augtool -s set /files/etc/ssh/sshd_config/PermitRootLogin yes
augtool -s set /files/etc/ssh/ssh_config/PasswordAuthentication yes
echo -e "$DIB_PASSWORD\n$DIB_PASSWORD\n" | passwd