Files
ld-install/prep_script.sh
Stephan Reinwald dad24e3e05 prep script chpasswd
2025-01-27 14:29:03 +01:00

26 lines
779 B
Bash

#!/bin/bash
# Create the folder at /etc/ld-install
mkdir -p /etc/ld-install
# Define the URLs of the files to download
YAML_URL="https://files.sbe.de/users/smk/ld40-install/application.yaml"
INSTALLER_URL="https://files.sbe.de/users/smk/ld40-install/ld-install"
# Download the files to the created folder
wget -o /etc/ld-install/application.yaml "$YAML_URL"
wget -o /etc/ld-install/ld-install "$INSTALLER_URL"
chmod +x /etc/ld-install/ld-install
# Append PermitRootLogin yes to /etc/ssh/sshd_config
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
# Restart the ssh service using systemctl
systemctl restart sshd
# Change the root user password to Muster24!
echo -e "root:Muster24!" | chpasswd
# Output completion message
echo "Script execution completed successfully."