Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am a bit confuse here, I'm trying to establish a connection to Active Directory server from linux, someone told me to use this command:

host -t srv

Assuming the Active Directory server is having this host name > [] and the output shows: has no SRV record

According to the documentation, if the output doesn't return an SRV record, then it could be a problem with my DNS. Does this means is not register in my linux's /etc/resolv.conf or it has to be register in Active Directory server?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

SRV records typically follow this structure:


For example, Microsoft AD relies on both LDAP and Kerberos to operate. So, in order to advertise these services, the following SRV records are created in the DNS domain representing the AD domain (let's say is our domain):

So really, what you should be running is this command:

host -t srv

For a more detailed explanation of how SRV records work, see this:

For a full listing and explanation of ActiveDirectory DNS SRV records, see this page:

And here is an example of a successful query for a Microsoft Key Management Server using the host command:

rouben@BeagleBoard-Black:~$ host -t srv has SRV record 20 0 1688 has SRV record 10 0 1688  
share|improve this answer

In an AD domain the typical service records, SRV records, published in DNS are the ones pointing to LDAP and Kerberos servers.

Those allow you to use DNS for the discovery so you don't have to configure explicit host names to use the LDAP and Kerberos services, giving you more flexibility to add and remove servers in your AD topology.

You find the LDAP and Kerberos servers in the AD domain <domain> by looking for the _ldap._tcp.<domain> and _kerberos._tcp.<domain> SRV records. e.g.

host -t srv
host -t srv

If is the only AD directory server you'd expect a result like: SRV record location:
    priority     = 0
    weight       = 100
    port         = 389
    srv hostname = 

AFAIK normally no SRV records are added for the hostnames of the actual domain controllers, so it is expected that the host command in your question wouldn't find any.

If you can resolve the hostname of to the actual IP-address of that AD server, then your DNS works well enough to connect to the AD domain. i.e. plain host must work.

share|improve this answer

The mistake is in the use of the actual hostname of the AD server. That isn't necessary you just need to list the "AD service names" along with your domain name.

  • _kerberos._tcp
  • _ldap._tcp


$ host -t srv has SRV record 0 100 389 has SRV record 0 100 389 has SRV record 0 100 389

Where my domain is and my AD servers are named ad1 - ad3.

SRV records

These records typically have this form (from wikipedia): TTL class SRV priority weight port target.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.