John R. Graham
2024-Oct-12 00:25 UTC
[Samba] AD/DNS: Cannot Create a CNAME record with a blank name...
...as recommended on the Samba Wiki here: https://wiki.samba.org/index.php/Active_Directory_Naming_FAQ#I_have_to_Use_Different_Names_to_Resolve_Host_Names_Internally_and_Externally I'm trying to use the "clever trick" to make a certain internal server resolve to the name I'm forced to use to resolve it externally. I successfully created the new zone (fictionalizing the names for inclusion here): ~ # samba-tool dns zonecreate "dc1" "myserver.example.com" -U administrator Zone myserver.example.com created successfully ...but I get a runtime error when I try to create the CNAME record in the zone "...leaving the name of the record blank." Here's what I did: ~ # samba-tool dns add "dc1" "myserver.example.com" "" CNAME "myserver.samdom.example.com"? -U Administrator ERROR(runtime): uncaught exception - (1383, 'WERR_INTERNAL_DB_ERROR') ? File "/usr/lib/python3.12/site-packages/samba/netcmd/__init__.py", line 279, in _run ??? return self.run(*args, **kwargs) ?????????? ^^^^^^^^^^^^^^^^^^^^^^^^^ ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line 1186, in run dns_conn.DnssrvUpdateRecord2(dnsserver.DNS_CLIENT_VERSION_LONGHORN, ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line 119, in f ??? return attr(*args) ?????????? ^^^^^^^^^^^ Have I misinterpreted the instructions and done it wrong? Thanks in advance for the help. - John
Rowland Penny
2024-Oct-12 07:50 UTC
[Samba] AD/DNS: Cannot Create a CNAME record with a blank name...
On Fri, 11 Oct 2024 20:25:00 -0400 "John R. Graham via samba" <samba at lists.samba.org> wrote:> ...as recommended on the Samba Wiki here: > https://wiki.samba.org/index.php/Active_Directory_Naming_FAQ#I_have_to_Use_Different_Names_to_Resolve_Host_Names_Internally_and_Externally > > I'm trying to use the "clever trick" to make a certain internal > server resolve to the name I'm forced to use to resolve it > externally. I successfully created the new zone (fictionalizing the > names for inclusion here): > > ~ # samba-tool dns zonecreate "dc1" "myserver.example.com" -U > administrator Zone myserver.example.com created successfully > > ...but I get a runtime error when I try to create the CNAME record in > the zone "...leaving the name of the record blank." Here's what I did: > > ~ # samba-tool dns add "dc1" "myserver.example.com" "" CNAME > "myserver.samdom.example.com"? -U Administrator > ERROR(runtime): uncaught exception - (1383, 'WERR_INTERNAL_DB_ERROR') > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/__init__.py", > line 279, in _run > ??? return self.run(*args, **kwargs) > ?????????? ^^^^^^^^^^^^^^^^^^^^^^^^^ > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line > 1186, in run > dns_conn.DnssrvUpdateRecord2(dnsserver.DNS_CLIENT_VERSION_LONGHORN, > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line > 119, in f > ??? return attr(*args) > ?????????? ^^^^^^^^^^^ > Have I misinterpreted the instructions and done it wrong? Thanks in > advance for the help. > > - John >You might just be the first to try this, I wasn't really aware of that particular faq, but now I look at it, I wonder if it ever worked ? I think your problem lies in that 'samba-tool dns add' requires 5 arguments: 'server' 'zone' 'name' 'rtype' 'data' Because you are supplying 'name' as "", it is being treated as if it isn't there, so 'samba-tool' is seeing: 'server' 'zone' 'rtype' 'data' Which is wrong. This may have worked with python2, but it doesn't appear to work with python3 (I know, I tried and got the same error as you). The thing is, your AD domain shouldn't be accessible externally, so what is the 'certain internal server' you need to access ? Rowland
Kees van Vloten
2024-Oct-12 09:15 UTC
[Samba] AD/DNS: Cannot Create a CNAME record with a blank name...
On 12-10-2024 02:25, John R. Graham via samba wrote:> ...as recommended on the Samba Wiki here: > https://wiki.samba.org/index.php/Active_Directory_Naming_FAQ#I_have_to_Use_Different_Names_to_Resolve_Host_Names_Internally_and_Externally > > I'm trying to use the "clever trick" to make a certain internal server > resolve to the name I'm forced to use to resolve it externally. I > successfully created the new zone (fictionalizing the names for > inclusion here): > > ~ # samba-tool dns zonecreate "dc1" "myserver.example.com" -U > administrator > Zone myserver.example.com created successfully > > ...but I get a runtime error when I try to create the CNAME record in > the zone "...leaving the name of the record blank." Here's what I did: > > ~ # samba-tool dns add "dc1" "myserver.example.com" "" CNAME > "myserver.samdom.example.com"? -U Administrator > ERROR(runtime): uncaught exception - (1383, 'WERR_INTERNAL_DB_ERROR') > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/__init__.py", > line 279, in _run > ??? return self.run(*args, **kwargs) > ?????????? ^^^^^^^^^^^^^^^^^^^^^^^^^ > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line > 1186, in run > dns_conn.DnssrvUpdateRecord2(dnsserver.DNS_CLIENT_VERSION_LONGHORN, > ? File "/usr/lib/python3.12/site-packages/samba/netcmd/dns.py", line > 119, in f > ??? return attr(*args) > ?????????? ^^^^^^^^^^^ > Have I misinterpreted the instructions and done it wrong? Thanks in > advance for the help.I have a similar need, but I create an A record at zone level with: samba-tool dns add localhost myserver.example.com myserver.example.com A 10.2.3.4 -U Administrator The trick is to specify zone-name and record-name with the same value. I have not tried to create a CNAME but given the syntax above that should be: samba-tool dns add localhost myserver.example.com myserver.example.com CNAME?myserver.samdom.example.com -U Administrator If it turns out that it does not work with a CNAME record, I would guess an A record also solves the issue. - Kees.> > - John > > >
Maybe Matching Threads
- AD/DNS: Cannot Create a CNAME record with a blank name...
- AD/DNS: Cannot Create a CNAME record with a blank name...
- AD/DNS: Cannot Create a CNAME record with a blank name...
- AD/DNS: Cannot Create a CNAME record with a blank name...
- Fwd: Re: Invalid data for index DN=@INDEX:OBJECTCLASS:DNSNODE