# Domainname

## Hal Pacino

As per the instructions of the installation I typed 

```
#echo (a_hostname) > /etc/hostname
```

 and then 

```
#echo(a_domainname) > /etc/dnsdomainname
```

 and finally 

```
#rc-update add domainname default
```

Anyway when I turn on the computer I get a host name, but no domain name, ie:

```
a_hostname.unknown_domain
```

What gives? How do I get the computer to REALLY use the domainname I gave it?

Thanks.

----------

## hanzotutu

I have the same problem....the login screen in console is always

"This is hostname.(none) (Linux i686.......)"

no matter how I played with dnsdomainname, nisdomainname...

----------

## dkaplowitz

Just add the domain name you want to use in your /etc/dnsdomain name file.

Mine says "mainlinecomputersupport.com", which is the name of my domain. You could call it any domain name you wanted, even microsoft.com if you want.

Good luck.

----------

## dkaplowitz

P.S. The same goes for the file /etc/hostname. Change this to the hostname you wish to assign your machine.

----------

## hanzotutu

still doesn't work.

```

scimd root # cat /etc/hostname

scimd

scimd root # cat /etc/dnsdomainname 

hanzohome.com

scimd root # /etc/init.d/domainname restart

 * Setting NIS domainname to hanzohome...                                 [ ok ]

 * Setting DNS domainname to hanzohome.com...                         [ ok ]

scimd root # dnsdomainname

scimd root # 

```

----------

## dkaplowitz

 *hanzotutu wrote:*   

> still doesn't work.
> 
> ```
> 
> scimd root # cat /etc/hostname
> ...

 

So if you type "hostname" what does it say?

What does it say when you type "dnsdomainname"?

----------

## hanzotutu

```

root@scimd scimd # hostname

scimd

root@scimd scimd # dnsdomainname

root@scimd scimd # 

```

dnsdomainname gave nothing though I did 'echo hanzohome > /etc/dnsdomainname'.

----------

## fusionx86

For what it's worth I have the same problem...

When I check /etc/dnsdomainname it does list the name I set, but it never shows. It just says hostname.(none)

----------

## dma

 *hanzotutu wrote:*   

> I have the same problem....the login screen in console is always
> 
> "This is hostname.(none) (Linux i686.......)"
> 
> no matter how I played with dnsdomainname, nisdomainname...

 

This is set by "domainname" (or /proc/sys/kernel/domainname).

----------

## Hal Pacino

Okay the domain name is set by proc, but how do we get the domain name we want?  :Confused: 

Thanks.

----------

## fosstux

Hi! What Kernel versions are you using?

I am having the same problem with a 2.4.20-gentoo-r7 kermel but with 2.4.20-gentoo-r8 it's working fine!

Bye.

----------

## Hal Pacino

I use linux-2.4.20-gentoo-r9 . Can someone please tell my why this doesn't work and how to make it work!  :Crying or Very sad: 

Thanks again.

----------

## hanzotutu

I am using gentoo-dev-sources-2.6-test11....upgrading to 2.6.0 soon. I have the same problem as mentioned before.

Even more, I found I don't have /proc/sys directory....

----------

## Hal Pacino

Check this out: https://forums.gentoo.org/viewtopic.php?t=113435

Hope that helps. It worked for me!   :Smile: 

----------

