Bug 13422 - Cannot delete DNS sub-domain
Summary: Cannot delete DNS sub-domain
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.8.1
Hardware: All Windows 10
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-07 01:56 UTC by Pancho
Modified: 2018-05-07 02:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pancho 2018-05-07 01:56:50 UTC
I can create a DNS sub-domain very easily via the MS Active Directory Users and Computers snap-in.

...but once created, i cannot delete it.
Comment 1 Pancho 2018-05-07 02:01:40 UTC
To illustrate, I created a DNS domain called "frog" 

When I subsequently try to delete it via the MS snap-in, I get a popup that says:

The DNS domain cannot be deleted. This function is not supported on this system.

Then looking at the samba logs on the server, I see the following....

[2018/05/07 01:34:37.514762,  0] ../source4/rpc_server/dnsserver/dcerpc_dnsserver.c:1581(dnsserver_operate_zone)
  dnsserver: zone operation 'DeleteNode' not implemented     DnssrvOperation2: struct DnssrvOperation2
          in: struct DnssrvOperation2
              dwClientVersion          : DNS_CLIENT_VERSION_LONGHORN (458752)
              dwSettingFlags           : 0x00000000 (0)
              pwszServerName           : *
                  pwszServerName           : 'dc1.ct.dummy.co.za'
              pszZone                  : *
                  pszZone                  : 'ct.dummy.co.za'
              dwContext                : 0x00000000 (0)
              pszOperation             : *
                  pszOperation             : 'DeleteNode'
              dwTypeId                 : DNSSRV_TYPEID_NAME_AND_PARAM (15)
              pData                    : union DNSSRV_RPC_UNION(case 15)
              NameAndParam             : *
                  NameAndParam: struct DNS_RPC_NAME_AND_PARAM
                      dwParam                  : 0x00000001 (1)
                      pszNodeName              : *
                          pszNodeName              : 'frog.ct.dummy.co.za'


While trolling the web looking for a possible answer, or method to delete the sub-domain directly from Samba I came across the following

https://www.spinics.net/lists/samba/msg113131.html

ie. the exact same problem.

I would greatly appreciate it if someone could tell me what i need to do in order to remove sub-domains. thanks
Comment 2 Pancho 2018-05-07 02:06:30 UTC
samba-tool dns query localhost ct.dummy.co.za @ ALL -U administrator

Results in the following output excerpt which includes my test "frog" sub domain.

 Name=ForestDnsZones, Records=0, Children=2
  Name=frog, Records=0, Children=0
  Name=fw1, Records=1, Children=0
    A: 192.168.1.1 (flags=f0, serial=3, ttl=3600)
  Name=idp, Records=1, Children=0