I was working on setting this up in a lab with a domain name similar to lab.example.com. The domain join is failing when attempting to calculate the workgroup name. I believe the error is on this line
Line 487: sed -i "2 s/.workgroup./workgroup = ${domainrealm%.*}/" /etc/samba/smb.conf
The replacement results in an attempt to set the workgroup to LAB.EXAMPLE instead of just lab.
Instead of changing the replacement logic, I would suggest prompting for the NetBIOS domain name as a separate input in the domainProperties function. I've seen domains where the DNS Domain Name would be something like current-company-name.com and the NetBIOS/Pre-Win2k domain name was OLD-COMPANY. Doesn't apply in my lab, but for sure something I've seen a handful of times.
I was working on setting this up in a lab with a domain name similar to lab.example.com. The domain join is failing when attempting to calculate the workgroup name. I believe the error is on this line
Line 487: sed -i "2 s/.workgroup./workgroup = ${domainrealm%.*}/" /etc/samba/smb.conf
The replacement results in an attempt to set the workgroup to LAB.EXAMPLE instead of just lab.
Instead of changing the replacement logic, I would suggest prompting for the NetBIOS domain name as a separate input in the domainProperties function. I've seen domains where the DNS Domain Name would be something like
current-company-name.comand the NetBIOS/Pre-Win2k domain name wasOLD-COMPANY. Doesn't apply in my lab, but for sure something I've seen a handful of times.