After I updated my domain server from Ubuntu 18.04 to 20.04 the NT domain no longer worked. Domain logons on the Windows 10 computers fail. (Ubuntu 18.04 is no longer supported).
So I set up a new (virtual) machine with Ubuntu 20.04 and a new domain name in order to trouble shoot this problem.
I get as far as "successfully" adding a Windows 10 computer to the domain ("Successfully" meaning "without any error messages"), but when I reboot that Win10 box, domain logons fail with the error:
"We can't sign you in ... because your domain isn't available."
If I log on with a local account, I can access the shares on the domain controller using a domain account (connect using different credentials).
This is my smb.conf:
# Global parameters
[global]
add machine script = /usr/sbin/useradd -N -g computers -c "Computer %u" -d /dev/null -s /bin/false %u
dns proxy = No
domain logons = Yes
domain master = Yes
log file = /var/log/samba/log.%m
logon drive = z:
logon home = \\dcubuntu18\netlogon
logon path = \\%N\profiles\%U
logon script = logon.cmd
map to guest = Bad User
max log size = 1000
name resolve order = lmhosts host wins bcast
obey pam restrictions = Yes
os level = 65
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
security = USER
server role = classic primary domain controller
server string = %h server
time server = Yes
unix extensions = No
unix password sync = Yes
usershare allow guests = Yes
wins support = Yes
workgroup = TWMDOMAIN
idmap config * : backend = tdb
admin users = @DomainAdmins
[homes]
browseable = No
comment = Home Directories
valid users = %S
[netlogon]
comment = Network Logon Service
guest ok = Yes
path = /home/netlogon
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[etc_samba]
browseable = No
path = /etc/samba
(The etc_samba share is there for allowing me to use windows tools to view the smb.conf file. This is of course not a production system.)
Could somebody please share with me a working smb.conf file and possibly other information on how to set up a new Samba server with Ubuntu 20.04 (Samba Version 4.7.6-Ubuntu) or later and a NT domain (not an AD domain)?