Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-11-2015, 05:15 AM   #1
LQ Newbie
Registered: Aug 2015
Posts: 1

Rep: Reputation: Disabled
making permanent /etc/resolv.conf

Hi all,

I am working on samba4 AD DC and windows machines had joind to Samba4 DC. But when I am trying to join linux clients to the Domain, along with other configurations we should give samba4 domain in /etc/resolv.conf
#nameserver //this is my samba4 domain ip address
#search // this is also the domain name of my samba4 DC

But after restarting my client machine to login to samba4 domain, this /etc/resolv.conf have overwritten the edited configuration. So, how can I make permanent this /etc/resolv.conf configuration?

Old 08-11-2015, 05:20 AM   #2
Registered: May 2015
Location: Latvia
Distribution: Arch, CentOS, ChakraOS
Posts: 275
Blog Entries: 5

Rep: Reputation: 214Reputation: 214Reputation: 214
Old 08-11-2015, 05:32 AM   #3
Senior Member
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,290

Rep: Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919
been here before....

To Quote NORMYZO on another (2008) thread:
NetworkManager will get DNS information where you tell it to get DNS from; you can either enter the DNS servers manually into your /etc/sysconfig/network-scripts/ifcfg-* files with the keys DNS1, DNS2, DNS3 (which NM will pick up and use automatically if the device is managed by NM), or you can use nm-connection-editor to add your preferred DNS servers to the connection.
google for this and you will find many instances. On my servers I do not install network manager. If it has been installed, simply removing it does NOT resolve all dynamic networking issues, as there are other things that come with it, but that helps.

Network Manager has some very nice features for a mobile machine (laptop, etc.) that are a nightmare for a server. If you have things you want locked in, either clean NM from the system and manage networking directly, or manage your network settings the NM way.

In your case, making it work the NM way seems the proper option.
Old 08-11-2015, 05:29 PM   #4
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 3,166
Blog Entries: 1

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674
You can modify the DHCP client configuration (/etc/dhcp/dhclient.conf) to setup a desired resolv.conf, otherwise it grabs whatever the DHCP server hands it. And updates that file every time the lease expires and needs to be renewed. You can use resolvconf or networkmanager to manage your DNS as well. You could setup a DHCP server and grab your DHCP leases from it and it can handle the shoveling of desired configurations. You could also chmod -w the file to make it not write-able which prevents it from changing. But will likely be problematic in the long run. Many ways to get there from here, some proper, some unconventional. I have a pi at my ISP side of my network that is a DHCP server and handles it for me. But my ISP is slow, so not a bottleneck. And I tend to have a resolv.conf that I can cp over the /etc/resolv.conf if I want to overried what got served. With the understanding that I'll need to redo that step with each new lease. Many ways, YMMV.


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
/etc/resolv.conf permanent changes rajaniyer123 Linux - Server 3 01-04-2012 08:48 AM
Making Ndiswrapper Permanent faref Slackware 6 05-29-2006 02:18 PM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
making chmod permanent Beckerjr Linux - General 5 05-11-2005 12:08 PM
Making Changes Permanent T-u-N-i-X Linux - General 1 09-01-2003 05:47 AM > Forums > Linux Forums > Linux - Newbie

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

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