Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/conf.d/hostname
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Sun Dec 15, 2013 8:54 am    Post subject: /etc/conf.d/hostname Reply with quote

quick q... why doesn't this service set these up properly, or have an option to set these up properly? why is this service rail roading my hostname at boot and not offering to properly set it up?

mkultra@mkultra [ ~ ]$ hostname --fqdn
localhost
mkultra@mkultra [ ~ ]$ domainname
(none)
mkultra@mkultra [ ~ ]$ hostname
mkultra
mkultra@mkultra [ ~ ]$ cat /etc/conf.d/hostname
# Set to the hostname of this machine
hostname="mkultra"

does anyone have proper examples of hostname domainname dnsdomainname nisdomainname ypdomainname nodename? thx gentoo i <3 you guys!
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 612
Location: Munich, Germany

PostPosted: Sun Dec 15, 2013 11:14 am    Post subject: Reply with quote

nodename is DECnet networks...unless you live in the 1980s you won't be using it.
domainname, nisdomainname, ypdomainname are for NIS/YP. Also quite old, I stopped using it around 2005.

The only import commands are hostname and dnsdomainname.

hostname = the hostname of your system, as configured in /etc/conf.d/hostname. In your case mkultra.
hostname --fqdn will return the full qualified name. This is done via a reverse DNS lookup. If will take the IP of you system and ask your DNS server for the corresponding PTR entry. If you don't have a well configured DNS server in your local network you can also use the /etc/hosts file.

For instance if your IP was 192.168.0.1 you could add a line like this to /etc/hosts:
Code:
192.168.0.1 mkultra.my.super.cool.domain mkultra


After that hostname --fqdn would return mkultra.my.super.cool.domain.

dnsdomainname is similar to hostname --fqdn except it only return the domain part. In the example above that would be my.super.cool.domain.
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Sun Dec 15, 2013 8:37 pm    Post subject: Reply with quote

so

hostname www

& hostname returns www

domainname example.com

& domain name returns example.com

& hostname --fqdn returns www.example.com

is this right?

furthermore....

/etc/hosts

192.168.0.254 www example.com www.example.com localhost localhost.localdomain

^^^ is that correct? (finally do you mind me setting this in stone on the wiki if alls well?)

my emails getting routed to spam because of localhost.localdomain via sendmail.
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 612
Location: Munich, Germany

PostPosted: Mon Dec 16, 2013 10:01 am    Post subject: Reply with quote

Try this in /etc/hosts:
Code:
127.0.0.1 localhost localhost.localdomain
192.168.0.254 www example.com www.example.com

_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum