I had to replace templates with custom templates, this may be a problem if the original templates get updates. Maybe it’s better to create a db prop for the nsdc hostname?
In this example the hostname of the nsdc is changed to NSADSRV.
Create the template-custom directories:
mkdir -p /etc/e-smith/templates-custom/var/lib/machines/nsdc/etc/hostname
mkdir -p /etc/e-smith/templates-custom/var/lib/machines/nsdc/etc/hosts
Create /etc/e-smith/templates-custom/var/lib/machines/nsdc/etc/hostname/10base
with following content (just one line):
nsadsrv.{lc($sssd{'Realm'})}
Create /etc/e-smith/templates-custom/var/lib/machines/nsdc/etc/hosts/10base
with these 3 lines:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
{$nsdc{'IpAddress'}} nsadsrv.{lc($sssd{'Realm'})} nsadsrv
Edit /var/lib/machines/nsdc/etc/samba/smb.conf
and change the netbios name
:
netbios name = NSADSRV
I had to uninstall and reinstall the AD account provider. I think it’s because the wrong “nsdc-hostname” was saved in AD too.
After that a domain join from Win7 and share access worked. Don’t try on production servers…