startup

by mea10mb
14 deployments · 1 still active · last rev. 2 years ago

Compatible with: No distros currently supported
						#!/bin/bash

# <UDF name="hostname" label="Host name"/>
# <UDF name="username" label="Unprivileged user name" />
# <UDF name="userpass" label="Unprivileged user password" />

pacman -Syu --noconfirm
echo $HOSTNAME > /etc/hostname
hostname -F /etc/hostname
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

echo "PermitRootLogin no" >> /etc/ssh/sshd_config
echo "PrintLastLog no" >> /etc/ssh/sshd_config
echo "Port 444" >> /etc/ssh/sshd_config
systemctl daemon-reload

echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
useradd -m -g users -G wheel -s /bin/bash $USERNAME
passwd $USERNAME <<EOF
$USERPASS
$USERPASS
EOF
chown -R $USERNAME:users /home/$USERNAME