From 10791986330294a2304d610c08128b54847cae1c Mon Sep 17 00:00:00 2001 From: jgaunt Date: Tue, 21 Jul 2020 20:44:54 -0400 Subject: [PATCH] changes to allow debian to work with realmd --- domainjoin.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/domainjoin.sh b/domainjoin.sh index 65e6e78..53ca077 100644 --- a/domainjoin.sh +++ b/domainjoin.sh @@ -22,12 +22,15 @@ fi echo "[active-directory]" > /etc/realmd.conf echo "os-name = ${OS}" >> /etc/realmd.conf echo "os-version = ${OS_VER}" >> /etc/realmd.conf -echo "[service]" >> /etc/realmd.conf -echo "automatic-install = no" >> /etc/realmd.conf # join the computer to the domain -echo ${password} | realm join -U ${username} ${domain} +if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then + echo ${password} | realm join -U ${username} --install=/ ${domain} +elif [ "${OS}" == "CentOS" ]; then + echo ${password} | realm join -U ${username} ${domain} +fi + # set the sssd options # don't require the full domain for the usernames