LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2005, 03:19 PM   #1
molecularbear
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Rep: Reputation: 0
How to set domainname in FC4?


I've been pouring over the /etc directory and cannot seem to figure out how to specify the domainname of the machine. After spending way too long, I became frustrated and simply edited /etc/init.d/network so that it just sets the domainname with:
Code:
domainname my.domain.com
Is there a way to set the domainname without using this hack?
 
Old 11-24-2005, 03:23 PM   #2
anickless
LQ Newbie
 
Registered: Nov 2005
Location: Edmonton
Distribution: Debian sarge & woody
Posts: 29

Rep: Reputation: 15
have you checked /etc/hosts?
 
Old 11-24-2005, 06:06 PM   #3
molecularbear
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by anickless
have you checked /etc/hosts?
I do not believe that /etc/hosts is used to set the domainname of a machine. I gave it a try anyway and it did not work.
 
Old 11-24-2005, 11:53 PM   #4
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
the correct place to enter it is

/etc/sysconfig/network

change it here and it will be there forever .. also change the corresponding entry in the /etc/hosts files.

then as root
service network restart

else you might get some other errors.

you can see the changes by
1) hostname command
or
2) Uname -n

and you will have to logout & then login to see the corrected changes
 
Old 11-27-2005, 12:51 PM   #5
molecularbear
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by abhijeetudas
the correct place to enter it is

/etc/sysconfig/network

change it here and it will be there forever .. also change the corresponding entry in the /etc/hosts files.
I am aware that I can set the hostname in the /etc/sysconfig/network file like this:
Code:
HOSTNAME=hostname.my.domain.com
But this does not result in the domainname being set. As in, if I run the `domainname` command, then I'll get "(none)" as the result. I tried adding this to the network file:
Code:
DOMAINNAME=my.domain.com
But that did not appear to work either. So far the following two methods work for setting the domainame:[list=1][*]Setting it through DHCP client[*]Hacking an init script[/list=1]
I know that in SuSE there is a file called something like /etc/defaultdomain that one can use to set the machine's domainname. Does Fedora Core 4 not have a way to do this?
 
  


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
Fc4 and Intel chip set Intimidator Fedora 4 07-10-2005 10:28 AM
Converting a FC4 dvd to FC4 cd set? prem1000 Fedora 2 06-17-2005 02:14 PM
domainname? kalleanka General 2 06-12-2005 04:53 PM
Can't set domainname jeffshanab Linux - Networking 13 05-28-2002 12:52 AM
domainname kevv Linux - Networking 1 05-03-2002 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:07 AM.

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