diff --git a/post/run.sh b/post/run.sh index 93ff5ba..60365ca 100644 --- a/post/run.sh +++ b/post/run.sh @@ -16,27 +16,27 @@ chmod 700 /home/sysadmin/.ssh curl -so /home/sysadmin/.ssh/authorized_keys $REPO/raw/branch/master/post/ansible.pub chown -R sysadmin:admins /home/sysadmin/.ssh -#echo -e "${GREEN}Disable root user SSH access...${NOCOL}" -#sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config -#sed -i 's/PermitRootLogin without-password/PermitRootLogin no/' /etc/ssh/sshd_config +echo -e "${GREEN}Disable root user SSH access...${NOCOL}" +sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config +sed -i 's/PermitRootLogin without-password/PermitRootLogin no/' /etc/ssh/sshd_config echo -e "${GREEN}Configuring default firewall...${NOCOL}" curl -so /etc/iptables/iptables.rules $REPO/raw/branch/master/post/iptables.rules curl -so /etc/iptables/ip6tables.rules $REPO/raw/branch/master/post/ip6tables.rules echo -e "${GREEN}Install minimal required packages...${NOCOL}" -pacman --noconfirm -S chrony cronie rsync iftop htop bash-completion iotop lsof screen fastfetch neovim man-db inetutils base-devel git networkmanager +pacman --noconfirm -S cronie rsync iftop htop bash-completion iotop lsof screen fastfetch neovim man-db inetutils base-devel git networkmanager ln -s /usr/bin/nvim /usr/bin/vi -echo -e "${GREEN}Setup Chronyd service...${NOCOL}" -curl -so /etc/chrony.conf $REPO/raw/branch/master/post/chrony.conf +echo -e "${GREEN}Setup time service...${NOCOL}" +sed -i 's/#NTP=/NTP=ntp1.xoservice.nl/' /etc/systemd/timesyncd.conf +sed -i 's/#FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org/FallbackNTP=ntp2.xoservice.nl/' /etc/systemd/timesyncd.conf echo -e "${GREEN}Activating required services...${NOCOL}" systemctl enable iptables systemctl enable ip6tables systemctl enable NetworkManager systemctl enable cronie -systemctl enable chronyd echo -e "${GREEN}Setup motd default...${NOCOL}" echo "" > /etc/motd