Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I'm trying to join Ubuntu client machine to domain server I'm getting this error:

Error: DNS_ERROR_BAD_PACKET [code 0x0000251e]
A bad packet was received from a DNS server. Potentially the requested address
does not exist.
share|improve this question
We are talking about Windows AD? How do you join? Is the firewall off on both systems? Is the DNS name known on both systems? Your DNS has a reverse lookup zone? What does cat /etc/resolv.conf show? – Rinzwind Jul 9 '13 at 11:32
Yes i am talking about windows AD. I'm joining through windows active directory as well as through command also sudo domainjoin-cli join fqdn.of.your.domain Administrator. Dns name also known. when i execute cat /etc/resolv.conf showing this " # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver " – user2542932 Jul 9 '13 at 13:25

This issue occurs when /etc/resolv.conf is not setup properly.

Here is a sample resolv.conf:

domain     domain.tld
search     domain.tld
nameserver <ip address of domain DNS server>
nameserver <ip address of domain DNS server>
share|improve this answer
Depending on your version of Ubuntu, this answer may be misleading/incorrect. As OP detailed in his question, he is seeing a nameserver value of which is not incorrect assuming he is using DNSMASQ as detailed in this article: – Lumberjack Mar 5 '15 at 20:00

I had this problem and spent 5 days trawling through forums. In the end I found a little note about DNS being picky about the spelling.

I fixed this by ensuring I used the uppercase letters in the FQDN where necessary. Windows doesn't care about upper and lower case but Linux does so try that.

The command I used was sudo domainjoin-cli join --disable ssh {domain name} {domain admin account name}

Hope this helps someone.

share|improve this answer

In my case the problem was caused by a second DNS server not being the domain controller.

I had 1 main DNS+DHCP server and 1 DNS+Active Directory server. The DNS records pointed the domain to the Active Directory server. But the DHCP was declaring itself as the DNS to use.

I solved the problem declaring in the DHCP that the DNS server was the DNS+Active Directory server. Apparently the joining is disrupted when the DNS server in use by the client is not the same Active Directory server.

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.