LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2006, 02:01 PM   #1
petkovsky
LQ Newbie
 
Registered: Mar 2005
Posts: 11

Rep: Reputation: 1
how do I unset domainname


Was wondering if anyone can tell me how to unset the domainname on a server?

I am running RHEL 3 and have installed Oracle 10gR2. In the instructions for 10gR2 it states to run the command domainname and ensure it has not been set dynamically.

(I'm back at the Oracle instructions trying to find a solution to 10g java connect to operating system problem in Oracle....That's another note)....

The domainname is dynamically set.

I have checked the /etc/sysconfig/network file where only HOSTNAME and NETWORKING are set.

Is this where the domainname is set? Or is it in the /etc/hosts file.

I currently have 127.0.0.1 {servername.domainname} {servername} localhost.localdomain localhost
set in the /etc/hosts file.

With additional entries for {ip addy} {servername.domainname} {servername}

Any help would be greatly appreciated.

Thank you in advance.
 
Old 08-11-2006, 02:13 AM   #2
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
firstly, /etc/hosts is used to resolve the names of other machines existing in the network. Even if the entry is there for your machine, the hostname and domainname can be set by network DNS server also.
I would like you to paste me some of the contents of the files:-

cat /etc/host.conf

If it is "order hosts,bind" then you can set your domainname or hostname via /etc/hosts file for the IP address of your machine (not local ip 127.0.0.1).

dnsdomainname command will show your DNS domainame.

Firstly tell me:-
1. Is your computer connected to any network LAN, WAN ??
2. IF so, is any DNS domainname provided to your machine for identifying it over the network ?
3. If not, then you can probably edit /etc/hosts file to clear up the domainname.
4. Print me the output of hostname, domainname, dnsdomainname, yphostname, nisdomainname.

I suggest you to have a look at man pages for domainame for more info.
 
Old 08-11-2006, 08:13 AM   #3
petkovsky
LQ Newbie
 
Registered: Mar 2005
Posts: 11

Original Poster
Rep: Reputation: 1
First, thank you very much for the reply.

/etc/host.conf is order hosts,bind

You mentioned "If it is "order hosts,bind" then you can set your domainname or hostname via /etc/hosts file for the IP address of your machine (not local ip 127.0.0.1)."

Do I need to remove the servername.domain and servername entries from the 127.0.0.1 entry?

My entry is:
127.0.0.1 {ccad2.usaw.bah.com} {ccad2} localhost.localdomain localhost

Here's the answer to your questions/requests.

1. Yes the server is on a network
2. Yes
3. Ok, maybe I can still fix it.
4. hostname: ccad2.usaw.bah.com
domainname: usaw.bah.com
dnsdomainname: usaw.bah.com
yphostname: not found
nisdomainname: usaw.bah.com

Thank you again for your assistance.
 
  


Reply



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 unset XIM_PROGRAM? tony yu Mandriva 6 12-07-2005 07:34 AM
BASH variables getting unset outside of loop trevelluk Programming 2 03-25-2005 07:14 AM
Unset praveenv Linux - Newbie 1 09-14-2004 05:37 PM
how to unset cflags? shanenin Linux - Software 4 01-25-2004 09:36 PM
unset a readonly variable hamster Linux - General 2 05-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:24 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