Web lists-archives.com

Re: [Samba] using samba with bind dlz




On Mon, 10 Jul 2017 09:17:52 -0600
Jeff Sadowski <jeff.sadowski@xxxxxxxxx> wrote:

> I found the
> file /usr/lib64/python2.7/site-packages/samba/provision/sambadns.py
> I was looking through it and seemed to come across the area where I am
> having problems.
> 
> In the create_dns_dir function
> 
> I wanted to see what paths.dns had and what dns_dir where getting set
> to.
> 
> so I did a simple print and found
> 
> paths.dir is set
> to /var/lib/samba/private/dns/fedora.methanemaker.mooo.com.zone
> and
> dns_dir is set to /var/lib/samba/private/dns
> 
> next I check those directories
> 
> [root@dc1 ~]# ls -l
> /var/lib/samba/private/dns/fedora.methanemaker.mooo.com.zone
> ls: cannot access
> '/var/lib/samba/private/dns/fedora.methanemaker.mooo.com.zone': No
> such file or directory

It doesn't work like that ;-)
You should have something like this:

ls -la /usr/local/samba/private/dns
total 2956
drwxrwx--- 3 root bind     4096 Nov 23  2016 .
drwxr-sr-x 8 root staff    4096 Jul 10 16:36 ..
-rw-rw---- 1 root bind  3014656 Sep 12  2016 sam.ldb
drwxrwx--- 2 root bind     4096 Nov 23  2016 sam.ldb.d

and sam.ldb.d:

ls -la /usr/local/samba/private/dns/sam.ldb.d/
total 28060
drwxrwx--- 2 root bind    4096 Nov 23  2016 .
drwxrwx--- 3 root bind    4096 Nov 23  2016 ..
-rw-rw---- 1 root bind 8925184 Sep 12  2016 CN=CONFIGURATION,DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb
-rw-rw---- 1 root bind 9187328 Sep 12  2016 CN=SCHEMA,CN=CONFIGURATION,DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb
-rw-rw---- 2 root bind 4247552 Jul 10 16:32 DC=DOMAINDNSZONES,DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb
-rw-rw---- 2 root bind 4247552 Jul 10 16:32 DC=FORESTDNSZONES,DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb
-rw-rw---- 1 root bind 1286144 Sep 12  2016 DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb
-rw-rw---- 2 root bind  831488 Jul 10 16:32 metadata.tdb

Your cow inspired dns zone should be in there, note: do note edit the
ldb files directly.


> [root@dc1 ~]# mkdir -p
> /var/lib/samba/private/dns/fedora.methanemaker.mooo.com.zone
> 
> it looks like samba-tool removes that directory

No, it is never creating it ;-)

> 
> I'll keep looking for the culprit in that function.

Not sure anything is wrong in python, it has always worked for me

Rowland


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba