changes for debian

https://paulgorman.org/technical/linux-active-directory-auth.txt.html

Debian doesn’t have authconfig, and (as of 2018) doesn’t enable oddjob-mkhomedir, even after installing it. So, enable it manually but editing /etc/pam.d/common-session:

session optional pam_oddjob_mkhomedir.so skel=/etc/skel/ umask=0022
This commit is contained in:
2020-07-21 21:09:02 -04:00
parent ba89b2b3c7
commit 076c176d1a

View File

@@ -27,6 +27,9 @@ echo "os-version = ${OS_VER}" >> /etc/realmd.conf
# join the computer to the domain
if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
echo ${password} | realm join -U ${username} --install=/ ${domain}
echo " " >> /etc/pam.d/common-session
echo "#oddjob-mkhomedir manual entry" >> /etc/pam.d/common-session
echo "session optional pam_oddjob_mkhomedir.so skel=/etc/skel/ umask=0022" >> /etc/pam.d/common-session
elif [ "${OS}" == "CentOS" ]; then
echo ${password} | realm join -U ${username} ${domain}
fi