# problem with unknown domain name in current install

## mikefot

Dear All,

I am running gentoo amd64 stable on an FX 8300 box.

On logging in I notice that the username I gave the machine/OS install is recognized.

But the network name is not for some reason.

```
bong /etc/conf.d # more hostname

# Set to the hostname of this machine

hostname="bong"

bong /etc/conf.d 
```

```
bong /etc/conf.d # more net

dns_domain_lo="hairnet"

config_eth0=dhcp"

```

```
bong /etc/portage # more make.conf

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-O2 -pipe"

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

MAKEOPTS ="-j14"

USE="bindist elogind introspection hpn ipv6 mmx pie selinux sse sse2 X policykit

"

#FEATURES="ccache" 

#CCACHE_SIZE="30G"

FEATURES="distcc"

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

INPUT_DEVICES="evdev synaptics"

VIDEO_CARDS="nouveau"

GENTOO_MIRRORS="http://www.mirrorservice.org/sites/distfiles.gentoo.org/ rsync:/

/rsync.mirrorservice.org/distfiles.gentoo.org/"

bong /etc/portage # 

```

Suggestions on what I have missed here would be most welcome.

Regards

MF

----------

## alamahant

Hi'

 Which hostname you want ?

"bong" or "hairnet"?

You can try something like

```

echo "<desired-hostname>" > /etc/hostname 

hostname -F /etc/hostname

```

and likewise you can also add it in /etc/conf.d/net

```

dns_domain_lo="<desired-hostname>"

```

You suspect some kind of hacking?

 :Smile: 

----------

## mikefot

Many thanks for your help here.

I had wanted "bong" to be the hostname and "hairnet" to be the domain name.

So root@bong.hairnet would be an address for the superuser and e.g. mikefot@bong.hairnet would work for a user.

Cheers

MF

PS I don't think Edward Scissorhands hacked the domain name in this case........

----------

## alamahant

Then this is correct the way it is reflected in your files.

If i were you i would enter

```

bong.hairnet

```

in /etc/hostname

and 

```

dns_domain_lo="hairnet"

```

in /etc/conf.d/net

Some people would only use "bong" in /etc/hostname

but i prefer to have the full FQDN in /etc/hostname

 :Very Happy: Last edited by alamahant on Mon Jun 01, 2020 3:13 pm; edited 2 times in total

----------

## mikefot

Many thanks for your help and advice.....

I edited 

```
hostname
```

 file in /etc/conf.d

and changed the  *Quote:*   

> "bong"

  entry to  *Quote:*   

> "bong.hairnet"

 .

I rebooted and now on logging in it now says 

```
" bong.hairnet@unknown_domain"
```

 instead of simply 

```
" bong@unknown_domain"
```

.

So I am still in dumb and dumber land here...

But maybe a fix will be found for this problem sooner than I might imagine....

Regards

MF

----------

## alamahant

Please try to do the opposite of what you did:

bong.hairnet in /etc/hostname

and dns_domain_lo="hairnet" in /etc/conf.d/net

There are two different files.

My bad I failed to clarify this.

You sould have this output in a terminal

```

hostname ->

bong.hairnet

hostname -d -> 

hairnet

```

 :Very Happy: 

----------

## mikefot

MAny thanks for your help and advice again.

I ran the diagnostic commands you suggested:

```
bong /etc # hostname   

bong.hairnet

bong /etc # hostname -d

hairnet

bong /etc # 
```

They seem to give the correct results that you would be hoping for.

But somehow when I log in I get this funny message saying  that the domain name 

is unknown.......

Regards

MF

----------

## charles17

 *mikefot wrote:*   

> Dear All,
> 
> I am running gentoo amd64 stable on an FX 8300 box.
> 
> On logging in I notice that the username I gave the machine/OS install is recognized.
> ...

 

Here I am also having This is <servername>.unknown_domain (Linux c86_64 4.19.122-gentoo) <time> coming from /etc.issue

But on log out the domain name changes to »fritz.box« as configured in the router.

----------

## mikefot

Many thanks for your comment.

I tried logging out and it said seomething about bong.hairnet bring the current system as of Jul 2018 and quoted an older kernel I was using and then talked about the new one I manually ccompiled the other day.......

So it looks as though I am smarter logging out than I am logging in........

Boom Shaka Lak....

Regards

MF

----------

## alamahant

If you run

```

rc-service hostname status

```

is the service running?

Also please apply the hostname

```

hostname -F /etc/hostname

```

 :Smile: Last edited by alamahant on Mon Jun 01, 2020 4:34 pm; edited 1 time in total

----------

## mikefot

[Many thanks for your suggestion.

I ran the diagnostic:

```
bong /etc # rc-service hostname status 

 * status: started

bong /etc # 

```

Seems to be running at present.

Cheers

MF

----------

