1829107 Members
2848 Online
109986 Solutions
New Discussion

/etc/resolv.conf entry

 
Franky_1
Respected Contributor

/etc/resolv.conf entry

Hello together,

i have to add a new domain to the search string in /etc/resolv.conf for several machines. Is it possible to do this in one "central" place (e.g. NIS) or do i have to change it on every single host?

Thx in advance

Regards

Franky
Don't worry be happy
5 REPLIES 5
Victor BERRIDGE
Honored Contributor

Re: /etc/resolv.conf entry

Is it possible to do this in one "central" place (e.g. NIS) or do i have to change it on every single host?
No except with NIS and I would not use NIS just for that...
There is an alternative: do a man of rdist and give it a try...

All the best
Victor
Franky_1
Respected Contributor

Re: /etc/resolv.conf entry

Hi Victor,

thx for your reply. We already have NIS implemented in that environment, so could you please outline the actions we have to take to distribute it from there?

Thx

Franky
Don't worry be happy
Victor BERRIDGE
Honored Contributor

Re: /etc/resolv.conf entry

Ji again,
Im not sure I undestood what you were trying to achieve:
If its updating resolv.conf on servers, you will have to change it on all concerned boxes
NIS is network => no local files...
So using NIS, the way I understand is :
The NIS (YP) server can be run in "DNS-forwarding mode",
where it forwards lookup requests to DNS for host-names and
-addresses that do not exist in its database.

So you would have in /etc/nssitch.conf file a line like this:
hosts: nis [NOTFOUND=return] DNS files
or
hosts: files DNS NIS


But Im no network expert...

All the best
Victor

P.S. For files we want centralised and distributed (e.g hosts...) we use rdist or rsync
Geoff Wild
Honored Contributor

Re: /etc/resolv.conf entry

You can use your own scripts to keep resolv.conf the same on multiple hosts...

You can use a system like cfengine to maintain that....

I believe you can also use System Insight Manager to do this as well.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor

Re: /etc/resolv.conf entry

Whether there are 10 or 1000 machines, updating a single file such as /etc/resolv.conf is a trivial task, and perfectly suited for scp to handle. If you haven't started using ssh exclusively, this is a great time to install and configure it. Otherwise, use Perl's ftp module to push the file, although you have to use .netrc or code a lot of login steps for each machine.


Bill Hassell, sysadmin