LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2004, 12:24 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
how do I set the domain name?


I have installed gentoo on 5 systems now, stage 1 install each time following the guide exactly, everything works great except that the domain name never seems to be set, I always get "unknown domain" every time it should be used, I followed the directions:

echo "MyDomain" > /etc/dnsdomainname

rc-update add domainname default

/etc/init.d/domainname start

but it still doesn't work.

I wan tot know what command sequence is used to set the domain name so that I can make my own script to do it.
 
Old 09-02-2004, 12:33 PM   #2
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Have you made changes to your /etc/hosts file to reflect the domain name? Have you checked the spelling really good (not accidentally swapped out a .net for .com.... I've done that one before).
 
Old 09-02-2004, 12:40 PM   #3
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
I do not know what changes need to be made in the /etc/hosts file, the guide didn't list any, and before switching to gentoo I never played w/ it (slackware)

as for a typeo like .com or .net wouldn't that just show my domain name as incorrect rather than unknown?
 
Old 09-02-2004, 12:46 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
below is an example of a hostfile from one of my computers
I believe you could also replace the 10.16.3.96 with a 127.0.0.1 if you are using a dhcp address. Try a change similar to that and see how it works....

[root@bcmcmail root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
10.16.3.96 bcmcmail bcmcmail.bcmctn.com
 
Old 09-02-2004, 01:08 PM   #5
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
I set it:
127.0.0.1 localhost
127.0.0.1 gma7 gma7.gma.com

no luck, I type domainname and it shows:

gma7 root # domainname
(none)

(That is after a reboot as well)

gma7 root # less /etc/hosts | more
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:
25 azarah Exp $
#

127.0.0.1 localhost
127.0.0.1 gma7 gma7.gma.com
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
Old 09-02-2004, 01:23 PM   #6
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
I tried putting it all into one line and it still didn't work, so I decided to go out on a limb and try the painfully obvious meathod not listed in the man pages or the --help output

"domainname gma" (I added the .com as a test, it is really just gma, not an actual net domain)

and sure enough it worked, the domainname was set to gma. I added that line to the startup script and it works...

domainname gma.. so obvious.. why not list it in the docs?
 
Old 09-02-2004, 01:47 PM   #7
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
I was just about to suggest that.... No, really, I was.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the domain name? Focle_Wulf-190 Slackware 3 03-28-2020 10:29 PM
Hot to set a Domain Name. philipina Linux - Networking 3 09-08-2004 02:11 PM
How to set up domain ronald_fancher Linux - Networking 4 12-19-2003 10:41 AM
Set up DNS for my domain. ikhebhet Linux - Networking 2 08-03-2003 08:39 PM
Want to set up a new domain name and hostname? hamster Linux - Networking 6 04-06-2003 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration