[Samba] How to get a list of all PTR records?
Rowland Penny
rpenny at samba.org
Tue Jan 4 15:35:56 UTC 2022
On Tue, 2022-01-04 at 08:10 -0600, Patrick Goetz via samba wrote:
> Coming back to this after the holidays ....
>
> > Everything is an LDAP object of objectclass dnsNode in the DNS
> > partitions, you can just look at them there.
>
> Is there a place where I can look at the LDB/LDAP schemas? I need
> more
> information in order to construct an appropriate search using,
> presumably ldbsearch. An example of such a search would be even
> better.
> I'm having trouble finding any examples of using ldbsearch online.
The AD schemas are usually installed with Samba, on Debian they are in:
/usr/share/samba/setup/ad-schema
The PTR records are stored in AD at:
DC=<your_reverse_zone>,CN=MicrosoftDNS,DC=DomainDnsZones,DC=X
Where <your_reverse_zone> is something like '0.168.192.in-addr.arpa'
and 'DC=X' is your default domain naming context e.g.
DC=samdom,DC=example,DC=com
You will need to use ldbsearch with 'cross-ncs' to obtain the records
and 'show-binary' to display human readable records. You can use the
machine key '-P' to search without a password.
Rowland
More information about the samba
mailing list