[Samba] Samba4 DNS - Adding CNAME

Mike Howard mike at dewberryfields.co.uk
Sat May 19 04:57:26 MDT 2012

On 19/05/2012 11:12, Michael Wood wrote:
> So, the question is; What am I doing wrong?
>>> I haven't tried the above myself, but it seems you are adding it the
>>> wrong way around.  i.e. it looks like you are saying that the
>>> canonical name of "centos" is "debian" instead of what you want (i.e.
>>> that the canonical name of "debian" is "centos".)
>>> i.e. it looks like you now have this situation:
>>> centos IN A
>>> centos IN CNAME debian
>> Yes, I did wonder about that and did try it the other way around. That
>> resulted in a new record as follows;
>>   Name=debian, Records=1, Children=0
>>     CNAME: centos. (flags=f0, serial=21, ttl=900)
>> But it still doesn't resolve.
> OK, then try specifying the FQDN for "centos" when you add the CNAME
> record.  From the output above it looks like it's adding a CNAME to
> "centos." instead of "centos.example.com".
> Also try:
> dig @ debian.example.com. IN CNAME
> If everything is set up correctly you should get something like this:
> [...]
> ;debian.example.com.		IN	CNAME
> debian.example.com.	3600	IN	CNAME	centos.example.com.
> [...]
Ok, I used;

samba-tool dns add example.com debian CNAME centos.example.com

a query now returns;

   Name=centos, Records=1, Children=0
     A: (flags=f0, serial=2, ttl=900)
   Name=debian, Records=1, Children=0
     CNAME: centos.example.com. (flags=f0, serial=23, ttl=900)

and 'dig @ debian.example.com. IN CNAME' returns;


;debian.example.com.   IN      CNAME

debian.example.com. 900 IN     CNAME   centos.example.com.


However, neither 'debian' nor 'debian.example.com' resolve to an IP, yet 
the output from dig implies the entry is correct? Of course, 'centos' 
does resolve.

Any question is easy if you know the answer!

More information about the samba mailing list