9df9ff9137
Implements: blueprint base-image Change-Id: I3e72db6d2f19fe45138758eb0821e27aa1c2542a
12 lines
487 B
Bash
Executable File
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
|