PDA

View Full Version : Yast2 DNS server How to add TXT record



Hwey
27-Mar-2013, 22:06
Hi,

I tried to insert a txt record for a DNS zone using Yast DNS server on SLES
10 SP4 unsuccessfully.
Since there are no TXT type on the DNS server interface, I cannot use Yast
DNS.

I added a TXT record manually in the zone file located at
/avr/lib/named/master/ and restart the DNS name service (rcnamed restart)
The TXT record added manually disappear from the zone file.

Does anyone have this problem and a solution for it?

Thank you in advance for your help,

Harry NG

jmozdzen
28-Mar-2013, 11:33
Hi Harry,

> I added a TXT record manually in the zone file

that would have been my first recommendation

> The TXT record added manually disappear from the zone file.

may I assume that it vanished *after you used YaST DNS* ? Then my only recommendation can be "don't use YaST DNS or switch to a more current platform, like SLES11SP2" :(

Maybe I'm too old-school, but for various things, and I see DNS amongst them, the YaST interface cannot be more than a "get me started" interface.

What does bother is that you have to be careful which YaST interfaces you invoke after manual changes. If your TXT records vanish without proper warning, just by going into YaST's DNS server configuration panel, this can cause severe operational problems. Therefore, if you decide to take the "manual edit" route, I suggest to uninstall the according YaST DNS module. The no-one can cause harm even by chance.

Regards,
Jens

Hwey
28-Mar-2013, 17:28
Hi Jens,

Thank you for replying to my question. I have figured out the cause of
the problem.

Actually, since there is no TXT record type in Yast DNS, there is no way
to add a TXT record for a zone file !

I realize that Yast DNS uses LDAP database, I use Yast LDAP Browser to
add a TxtRecord for the zone file. But, when restarting the named
service (rcnamed restart), there is no TXT record in the zone file!!
Even when adding manually a TXT record in the zone file, the service
restarting makes it disappear !!

I trace the file 'rcnamed' and found that it uses ldapdum
(/usr/share/bind/) for each DNS record. By looking into the file
'ldapdump', I found that the function 'createStaticZone' has missed the
TXT record when creating zone file(s).

I adds TXT in the loop 'foreach' in ldapdump as follows:

sub createStaticZone {
...
foreach my $rec ( qw( NS A MX TXT PTR CNAME SRV HINFO MINFO SIG KEY
AAAA LOC NXT NAPTR KX CERT A6 DNAME ) ) {
...
}

then restart the named server.

Now all works as it should

Just for your info and others who have the same problem as mine

Regards,

Hwey

On 03/27/2013 5:06 PM, Hwey wrote:
> Hi,
>
> I tried to insert a txt record for a DNS zone using Yast DNS server on SLES
> 10 SP4 unsuccessfully.
> Since there are no TXT type on the DNS server interface, I cannot use Yast
> DNS.
>
> I added a TXT record manually in the zone file located at
> /avr/lib/named/master/ and restart the DNS name service (rcnamed restart)
> The TXT record added manually disappear from the zone file.
>
> Does anyone have this problem and a solution for it?
>
> Thank you in advance for your help,
>
> Harry NG
>
>
>
>

jmozdzen
28-Mar-2013, 17:48
Hi Hwey,

thank you for taking your time to report back the solution!

Regards,
Jens