# The "hostname.unknown_domain" issue

## jmann

Hi folks.

My system is running a fresh install of 2005.1-r1.

I want the system to obtain it's network configuration by DHCP, including it's DNS domain name, so I left DNSDOMAIN commented out in /etc/conf.d/domainname.  I also set OVERRIDE to 0.

When the system boots up, an IP address is assigned just fine, but then I am presented with a login prompt preceeded by "This is gentoo.unknown_domain".

I have done some searching to find a solution to this problem, but all the posts I have found usually give the suggestion of making sure the DNS domain name is correctly set in /etc/conf.d/domainname and /etc/hosts.

In an environment where DHCP is being used this seems like totally the wrong solution.  I want my host to get the domain name of whatever network it is attached to, not one that I hard-set in config files.

I know that the DHCP server is giving out the domain name information as other systems running different OS's get configured just fine, so I tried adding the -D flag to dhcpcd to tell it to set the system's DNS domain domain.  I added the following to /etc/conf.d/net:

```
dhcpcd_eth0="-D"
```

This does not solve the problem though.

I have noticed that /etc/resolv.conf IS modified at boot, and the correct domain name is added.  Also, if I run the "domainname" command, it does return the correct domain name.

Why then will it not show this domain name in the login banner?

Can anyone shed any light on this?

Thanks.

Jason

----------

## Wooff

EXACTLY same with me ))-: 

after not so little time Iam give it up and didnt solve it ))-: 

W

good luck

----------

## iainel

I used to have this problem and my research pointed me to a problem with the order of a line in /etc/hosts.  Can't find the solution but try setting the /etc/hosts line starting with 127.0.0.1 to

```

127.0.0.1 <hostname>.<domainname> <hostname>

```

Mine is:

```

127.0.0.1 pc1.homenetwork pc1

```

Hope this helps.

----------

## Wooff

sure, but its manual setting. but we would like to receive it from name server... 

W

----------

## DevSolar

I don't have my Gentoo box available ATM, but found two related hints in a German-language Linux forum:

One user reported that setting "n" in /etc/issue gave the complete name, i.e. hostname.domain.

Another reported that settin dhcpcd_eth0="-h gentoo -D" in /etc/conf.d/net solved the problem for him.

As I said, I currently cannot test either.

----------

