LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-19-2009, 09:34 AM   #1
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Rep: Reputation: 30
search path in resolv.conf overwritten by the hostname after reboot


Before reboot,
$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 172.20.10.22
search mycomp.local myhost.com

After reboot, the search path in resolv.conf is overwritten by the hostname.
Please help to prevent this from occurring.
Thanks.
$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 172.20.10.22
search penguin
 
Old 03-19-2009, 10:46 AM   #2
Nibbl3r
LQ Newbie
 
Registered: Dec 2008
Location: Zuerich, Switzerland
Distribution: Fedora Core/Debian
Posts: 28

Rep: Reputation: 16
What are the file-rights you got on resolv.conf? Maybe you wanna give us the rights of /etc/
/etc/resolv.conf

And with what user do you run the dhclient-script?
 
Old 03-19-2009, 11:04 AM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Read and understand the dhclient(8) manpages (and the complementary pages under the SEE ALSO section).

Or apply the brute force method:
# chattr +i /etc/resolv.conf
 
Old 03-20-2009, 02:13 PM   #4
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by anomie View Post
Read and understand the dhclient(8) manpages (and the complementary pages under the SEE ALSO section).

Or apply the brute force method:
# chattr +i /etc/resolv.conf
I create a /etc/dhclient.conf with 5 different values as follows, reboot 5 times, but still do not get my desired /etc/resolv.conf
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers, host-name, nis-domain;
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers, host-name, nis-domain, nis-servers;
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers, nis-domain, nis-servers;
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers, host-name, nis-domain;
request subnet-mask, broadcast-address, routers, domain-name, host-name, nis-domain, nis-servers;

The best I can get is:
$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 172.20.10.22
search penguin

Last edited by powah; 03-20-2009 at 02:15 PM.
 
  


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
Mandriva: Why is /etc/resolv.conf overwritten at boot? fc6_user Linux - Networking 12 05-17-2007 06:59 PM
/etc/resolv.conf being overwritten... detpenguin Slackware 4 04-12-2005 01:42 PM
Resolv.conf Overwritten jlcarmic Debian 2 05-27-2004 08:14 AM
resolv.conf overwritten on boot cjpsparks Linux - Networking 1 11-06-2003 02:06 AM
resolv.conf overwritten LocHolmez Linux - Networking 2 09-22-2003 09:51 AM

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

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