LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-11-2015, 06:15 AM   #1
nmehari
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 10.140.5.18 //this is my samba4 domain ip address
#search ad.ju.edu.et // 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?

Please....
 
Old 08-11-2015, 06:20 AM   #2
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, CentOS, ChakraOS
Posts: 262
Blog Entries: 5

Rep: Reputation: 180Reputation: 180
https://wiki.archlinux.org/index.php...e_DNS_settings
 
Old 08-11-2015, 06:32 AM   #3
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,650

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
been here before....

To Quote NORMYZO on another (2008) thread:
Quote:
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, 06:29 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,321
Blog Entries: 1

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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.
 
  


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


All times are GMT -5. The time now is 04:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration