Bug 11695 - samba_upgradedns fails if DnsAdmins group moved from default location
Summary: samba_upgradedns fails if DnsAdmins group moved from default location
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DNS server (internal) (show other bugs)
Version: 4.3.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Kai Blin
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-26 20:36 UTC by Derek Lambert
Modified: 2016-03-08 13:46 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Lambert 2016-01-26 20:36:38 UTC
If the DnsAdmins group is moved from the Users container samba_upgradedns fails with:

Traceback (most recent call last):
  File "/usr/sbin/samba_upgradedns", line 262, in <module>
    paths, lp.configfile, lp)
  File "/usr/lib64/python2.7/site-packages/samba/provision/__init__.py", line 330, in find_provision_key_parameters
    dns_admins_sid = get_dnsadmins_sid(samdb, names.domaindn)
  File "/usr/lib64/python2.7/site-packages/samba/provision/sambadns.py", line 68, in get_dnsadmins_sid
    attrs=["objectSid"])
_ldb.LdbError: (32, 'No such Base DN: CN=DnsAdmins,CN=Users,DC=dom,DC=creof,DC=com')

Method get_dnsadmins_sid() of sambadns.py has the Users container hardcoded in the search:

def get_dnsadmins_sid(samdb, domaindn):
    res = samdb.search(base="CN=DnsAdmins,CN=Users,%s" % domaindn, scope=ldb.SCOPE_BASE,
                       attrs=["objectSid"])