Patrick Goetz
2021-Nov-04 17:59 UTC
[Samba] How to use samba-tool dns to manually add a PTR record
Here is the relevant docstring: root at atomsmasher:~# samba-tool dns add -h Usage: samba-tool dns add <server> <zone> <name> <A|AAAA|PTR|CNAME|NS|MX|SRV|TXT> <data> Add a DNS record For each type data contents are as follows: A ipv4_address_string AAAA ipv6_address_string PTR fqdn_string CNAME fqdn_string NS fqdn_string MX "fqdn_string preference" SRV "fqdn_string port priority weight" TXT "'string1' 'string2' ..." What does "fqdn_string" mean? Because I tried this: root at samba-dc:~# samba-tool dns add samba-dc ea.linuxcs.com atomsmasher PTR atomsmasher.ea.linuxcs.com and it didn't work: root at samba-dc:~# host atomsmasher atomsmasher.ea.linuxcs.com has address 192.168.1.82 root at samba-dc:~# host 192.168.1.82 Host 82.1.168.192.in-addr.arpa. not found: 3(NXDOMAIN) Also tried: root at samba-dc:~# samba-tool dns add samba-dc ea.linuxcs.com atomsmasher PTR 82.1.168.192.in-addr.arpa and root at samba-dc:~# samba-tool dns add samba-dc ea.linuxcs.com atomsmasher PTR 192.168.1.82 which also didn't work.
Rowland Penny
2021-Nov-04 18:24 UTC
[Samba] How to use samba-tool dns to manually add a PTR record
On Thu, 2021-11-04 at 12:59 -0500, Patrick Goetz via samba wrote:> Here is the relevant docstring: > > root at atomsmasher:~# samba-tool dns add -h > Usage: samba-tool dns add <server> <zone> <name> > <A|AAAA|PTR|CNAME|NS|MX|SRV|TXT> <data> > > Add a DNS record > > For each type data contents are as follows: > A ipv4_address_string > AAAA ipv6_address_string > PTR fqdn_string > CNAME fqdn_string > NS fqdn_string > MX "fqdn_string preference" > SRV "fqdn_string port priority weight" > TXT "'string1' 'string2' ..." > > > What does "fqdn_string" mean? Because I tried this: > > root at samba-dc:~# samba-tool dns add samba-dc ea.linuxcs.com > atomsmasher > PTR atomsmasher.ea.linuxcs.com > > and it didn't work:You got the '<data>' correct, but you got the '<zone>' and '<name>' wrong You are adding a PTR record and this is added to your reverse zone, the one that ends in 'arpa'. The '<name>' in this case is the IP, so your command should be: samba-tool dns add samba-dc 1.168.192.in-addr.arpa 82 PTR atomsmasher.ea.linuxcs.com Rowland