Bug 10870 - Realm must not be equal to short domain name
Summary: Realm must not be equal to short domain name
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DNS server (internal) (show other bugs)
Version: 4.1.12
Hardware: x86 Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Kai Blin
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-12 03:02 UTC by Jonas
Modified: 2016-11-25 10:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas 2014-10-12 03:02:10 UTC
Hello,

i am upgrading my Samba 3 domain controller to a Samba 4 AD DC. My server has the following informations:

hostname = abc
netbios name = ABC
WORKGROUP = ABC.COM

When i try:

/usr/local/samba/bin/samba-tool domain classicupgrade --dbdir=/etc/samba.PDC/dbdir/ --use-xattrs=yes --realm=abc.com --dns-backend=SAMBA_INTERNAL /etc/samba.PDC/smb.PDC.conf

this is the error output:

[...]
ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: guess_names: Realm 'ABC.COM' must not be equal to short domain name 'ABC.COM'!
[...]

Why can't i use the same name to the realm and the domain?

So, i tried to use another realm name:

/usr/local/samba/bin/samba-tool domain classicupgrade --dbdir=/etc/samba.PDC/dbdir/ --use-xattrs=yes --realm=realm.abc.com --dns-backend=SAMBA_INTERNAL /etc/samba.PDC/smb.PDC.conf

and it successfully ends.

But it does not change only the realm name. Look:

[...]
Hostname:            abc
NetBIOS Domain:      ABC.COM
DNS Domain:          realm.abc.com
[...]

Why "DNS Domain" is shown like realm.abc.com? Is it not only my realm?

Testing:

$ host -t SRV _ldap._tcp.realm.abc.com.
_ldap._tcp.realm.abc.com has SRV record 0 100 389 abc.realm.abc.com.

$ host -t SRV _kerberos._udp.realm.abc.com.
_kerberos._udp.realm.abc.com has SRV record 0 100 88 abc.realm.abc.com.

$ host -A tcc.realm.abc.com.
tcc.realm.abc.com has address 192.168.0.50

My new smb.conf shows:

netbios name = ABC
WORKGROUP = ABC.COM
realm = realm.abc.com


In my smb.conf, my domain is ABC.COM, but in my internal DNS, my domain is realm.abc.com. I did not understand it.

If i try to test host -A abc.abc.com, it does not work. So, in my DNS my domain is set to realm.abc.com and in my smb.conf abc.com?????

How can i solve this problem? Can't i use abc.com to the domain and the realm name??????

I hope you have understand...
Comment 1 Stefan Metzmacher 2015-07-31 08:54:27 UTC
This is not a regression, it never worked before...
Comment 2 Stefan Metzmacher 2016-11-25 10:06:48 UTC
(In reply to Stefan Metzmacher from comment #1)

You should never use a workgroup or netbios name with a '.' in it.

Why don't you simply use

hostname= abc-dc1
netbios name = ABC-DC1
workgroup = ABC
realm = ABC.COM

The thing is that the netbios name of the host ("netbios name")
can't be the same as the netbios name of the domain ("workgroup").