Update install-ubuntu-dc.sh

This commit is contained in:
Johan 2022-07-26 21:54:40 +02:00
parent 2502e68bda
commit c930b5cca3

View File

@ -17,15 +17,14 @@ if ip r | grep -iq 'DHCP'; then
fi
#: <<'END_COMMENT' END_COMMENT
cat << EOF
Before you continue, make sure your system is updated by running "apt update && apt upgrade"
# apt update
EOF
read -e -p "Enter hostname:" -i "dc1" DCHOST
read -e -p "Enter realm:" -i "myspace.local" DCREALM
read -e -p "Enter domain:" -i "myspace" DCDOMAIN
rm install.log /dev/null 2>&1
{
hostnamectl set-hostname $DCHOST &&
# timedatectl list-timezones | grep -i europe &&
@ -35,7 +34,6 @@ rm install.log /dev/null 2>&1
cat << EOF
Use these settings:
------------------------------------------------------------
Default Kerberos version 5 realm: ${DCREALM^^}
Kerberos servers for your realm: $DCHOST.${DCREALM,,}
@ -105,7 +103,7 @@ fi
sed -i '/pam_unix.so/c\password [success=1 default=ignore] pam_unix.so minlen=0 sha512' /etc/pam.d/common-password
} 2>>install.log
touch /var/lib/samba/sysvol/myspace.local/scripts/logon.cmd
chmod 770 /var/lib/samba/sysvol/myspace.local/scripts/logon.cmd
touch /var/lib/samba/sysvol/${DCREALM,,}/scripts/logon.cmd
chmod 770 /var/lib/samba/sysvol/${DCREALM,,}/scripts/logon.cmd
echo 'Installation complete'