LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-13-2007, 01:28 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
Editing /etc/resolv.conf


Hi! has anyone installed Red Hat 5 and tried to edit /etc/resolv.conf? In all other previous releases we were able to modify this file by hand now it states it is being managed by network manager and do not edit? How can we manually edit this file without having it clear the configuration the contents of this file each time we restart or restart network services?
 
Old 04-13-2007, 02:19 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I've manually edited the /etc/resolv.conf on my FC5 system with no issues. I've not seen the message you mention.

I just did "man NetworkManager" and it appears to be related to DHCP. Are you using DHCP to get your network address? If so it would overwrite your /etc/resolv.conf based on the information provided by the DHCP server every time it got an address. My system has a static IP so that is likely the difference.

I did once do this on a Debian system that I was doing dhcp for IP. On that system I found the dhclient.conf had a line for superseding domain name provided from the DHCP server:
Code:
supersede domain-name "mydomain.com mydomain.net dmz.mydomain.com";
I didn't supersede the servers but looking at the man page it looks like that can be done with:
Code:
supersede domain-name-servers <ipaddress>, <ipaddress>;
Where each comma separated ipaddress is the IP of one of your name servers.

The file is dhclient.conf and was in /etc on Debian. It doesn't exist on my FC box so I'm not sure if it would be there or in /etc/sysconfig/networking or /etc/sysconfig/network-scripts (these latter two being where Redhat/Fedora usually have networking related files - they don't exist on Debian). I have the man pages on the FC system but no conf file since I don't have it doing dhcp. If you do have it you can find a sample dhclient.conf with:
rpm -ql dhclient
 
Old 04-13-2007, 10:49 PM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks for the reply, I figured it out it was an error on my behalf I forgot to specify bootproto=static in the /etc/sysconfig/networ-scripts/eth0 config file. Therefore everytime I was running a service network restart it would clear the /etc/resolv.conf file when it picked up a dynamic IP and DNS address. I appreciate you helping me clear up this dilema now on to registering.
 
  


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
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
Who changes /etc/resolv.conf? lmp Debian 4 11-29-2005 08:08 AM
/etc/resolv.conf Pedroski Linux - Networking 1 06-22-2004 10:03 AM
resolv.conf jmdlcar Slackware 9 05-15-2004 11:44 AM
Resolv.conf tristan_vdv Linux - Networking 2 11-20-2001 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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