modify /etc/resolv.conf search order

Forum Members -

I have a laptop that I use at work and home. The laptop uses DHCP to get it’s IP address and to write the /etc/resolv.conf file. What is the best way to modify the /etc/resolv.conf file and add a domain to the search line for when I am at work? Some background: I am using NetworkManager to manage my network settings, and am using KDE4 as my Desktop Environment. Although it looks like /etc/resolv.conf file is being generated by a tool called netconfig

Thanks,
James

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can you have your work modify their order? Otherwise you can just modify
the file with your favorite editor:

sudo vi /etc/resolv.conf

Good luck.

jcolby76 wrote:
> Forum Members -
>
> I have a laptop that I use at work and home. The laptop uses DHCP to
> get it’s IP address and to write the /etc/resolv.conf file. What is the
> best way to modify the /etc/resolv.conf file and add a domain to the
> search line for when I am at work? Some background: I am using
> NetworkManager to manage my network settings, and am using KDE4 as my
> Desktop Environment. Although it looks like /etc/resolv.conf file is
> being generated by a tool called netconfig
>
> Thanks,
> James
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKMT/RAAoJEF+XTK08PnB5Z1wP/0QcAkfbJZUB4oeYQC17w91h
M3YLnDC0Y3qjFWA84R7LTM4R95eylwoW7pZLtGf6qUDcCLEncRAnuTccUZMHCynO
7HkI1BZyMxd73dh0lm26pfeiqmBTyeyVs68K/AEJV2JkG/uVLVP62vKPxdlhqhm4
QycCkYCRYUoE2ZYt7qOBGyMbHYrRat1Ndpgvhi7gOQotbdCf00nANng/eEMt5Fda
nFIxJS79oayjOl0e26UE5NnrX0/yQsXck99vY2Z13wnEa4daHn+wKlf6EdunBYCB
TxvC5Avdxqq6RmHREY9dPdFslIlMTX3VXfmq7qXHxobYNbJPIBQeF0s4ZB3zMsY/
8w82lgPhCdHpmcsp3QMq+wbeDsjr474rOsEIqHvXa873eB6tedwIEbjTSwQwaHUD
8ucqDDBkCBVFLzKOObOlnvoIj+LzAx+gRURZOBwIn/EP++3/sV54b36wK5UJLsYs
YxCXfUn0Khc/qQZhx3z21XYuxI+iBGCA9LeC3Pqy3oPjA8Znj1SDEk4Y3IJ5HjIh
j+umoq7d6JQF+YkEF8eAcy4QpWSeznsMCl1kaa9lG+zUm2dd3oqU5IGRmu7t9sHS
ZrnCUVl1FyvPn80dAnqSpknlEZKGBhGc3YZHekKKRcCwTANYKTWLDKFk94m6yYkG
sZPJKI4S28ZnpB1gmfaH
=hkib
-----END PGP SIGNATURE-----

Thanks for the tip, but I am afraid that it would not go over well if I asked the company to change part of the infrastructure. :slight_smile: Plus I think that it may be an issue with the DNS client as the windows clients have all of the search domains in it.

I also believe that if I manually edit my resolv.conf that it will not be over written when I start my home Internet connection.

Thanks,
James

I found the answer: I need to edit /etc/dhclient.conf and add the line append domain-name " <domain name>";