[Samba] More on bind_dlz - documentation I have not found

Rowland Penny rowlandpenny241155 at gmail.com
Fri Aug 28 14:03:52 UTC 2015


On 28/08/15 14:55, Robert Moskowitz wrote:
>
>
> On 08/28/2015 09:37 AM, Rowland Penny wrote:
>> On 28/08/15 14:13, Robert Moskowitz wrote:
>>>
>>>
>>>>
>>>>> I have not yet checked any ldap documentation on the wiki to see 
>>>>> what it says, but I suspect a dhcp lease results in an ldap 
>>>>> update. Would a lease expire remove that ldap info?
>>
>> It should do, if dhcp is set up correctly.
>
> We will be getting to this shortly!
>
>>
>>>>>
>>>
>>
>>>
>>> /usr/share/samba/setup
>>
>> This stores samba docs used to install samba (or something like this)
>
> So I need to do the includes into /etc/named.conf from there.

No, use the ones in /var/lib/samba , they should be set for you, there 
is also a krb5.conf in there, you should also use this.

>
>>
>>
>
> Mark is a bit of a purist; it IS much his code.  And he pretty much 
> thinks in C.

Well, I don't know him, so I don't have to worry about upsetting him by 
not using views :-)

>
>>
>> OK, to see the AD object for your forward zone, install ldb-tools, 
>> you do this with 'apt-get install ldb-tools' on debian
>> Then run this command: ldbsearch -H /var/lib/samba/private/sam.ldb 
>> --cross-ncs "(DC=home.htt)"
>
> yum install ldb-tools
> Loaded plugins: fastestmirror
> Shivaserv-sernet                                         | 2.9 kB     
> 00:00
> c7buildroot                                              | 2.9 kB     
> 00:00
> c7pass1                                                  | 2.9 kB     
> 00:00
> comps                                                    | 3.6 kB     
> 00:00
> epel                                                     | 4.3 kB     
> 00:00
> (1/2): epel/updateinfo                                     | 344 kB   
> 00:01
> (2/2): epel/primary_db                                     | 3.5 MB   
> 00:04
> Loading mirror speeds from cached hostfile
> Package ldb-tools-1.1.17-2.el7.armv7hl is obsoleted by 
> 99:sernet-samba-ad-4.2.3-18.el.armv7hl which is already installed
>
> So it is already there thanks to sernet.
>
> # ldbsearch -H /var/lib/samba/private/sam.ldb --cross-ncs "(DC=home.htt)"
> # record 1
> dn: DC=home.htt,CN=MicrosoftDNS,DC=DomainDnsZones,DC=home,DC=htt
> objectClass: top
> objectClass: dnsZone
> instanceType: 4
> whenCreated: 20150827220723.0Z
> whenChanged: 20150827220723.0Z
> uSNCreated: 3656
> uSNChanged: 3656
> showInAdvancedViewOnly: TRUE
> name: home.htt
> objectGUID: 34b4ec5b-bfd2-42e0-96df-c5b12a512725
> objectCategory: CN=Dns-Zone,CN=Schema,CN=Configuration,DC=home,DC=htt
> dNSProperty:: BAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAA==
> dNSProperty:: AQAAAAAAAAAAAAAAAQAAAAIAAAACAAAAAA==
> dNSProperty:: CAAAAAAAAAAAAAAAAQAAAAgAAAAAAAAAAAAAAAAAAAA=
> dNSProperty:: BAAAAAAAAAAAAAAAAQAAABAAAACoAAAAAAAAAA==
> dNSProperty:: BAAAAAAAAAAAAAAAAQAAACAAAACoAAAAAAAAAA==
> dNSProperty:: BAAAAAAAAAAAAAAAAQAAAEAAAAAAAAAAAAAAAA==
> dNSProperty:: BAAAAAAAAAAAAAAAAQAAABIAAAAAAAAAAAAAAA==
> dc: home.htt
> distinguishedName: 
> DC=home.htt,CN=MicrosoftDNS,DC=DomainDnsZones,DC=home,DC=htt
>
> # returned 1 records
> # 1 entries
> # 0 referrals
>
>
>>
>>>
>>> Not for the samba zone, but yes for other zones.
>>
>> You should really just use the samba DNS server (either the builtin 
>> one or bind) for the the samba zones, but I suppose you could add 
>> other zones, just create them with samba-tool.
>
> So I tried:
>
> # samba-tool dns zonelist localhost
> Failed to connect host 127.0.0.1 on port 135 - 
> NT_STATUS_CONNECTION_REFUSED
> Failed to connect host 127.0.0.1 (127.0.0.1) on port 135 - 
> NT_STATUS_CONNECTION_REFUSED.
> ERROR(runtime): uncaught exception - (-1073741258, 'The connection was 
> refused')
>   File "/usr/lib/python2.7/site-packages/samba/netcmd/__init__.py", 
> line 175, in _run
>     return self.run(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/samba/netcmd/dns.py", line 
> 809, in run
>     dns_conn = dns_connect(server, self.lp, self.creds)
>   File "/usr/lib/python2.7/site-packages/samba/netcmd/dns.py", line 
> 40, in dns_connect
>     dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
>
> I THINK I have the services running...
>

make sure samba is running and try this:

samba-tool dns zonelist localhost -U Administrator





More information about the samba mailing list