Find the answer to your Linux question:
Results 1 to 6 of 6
Hallo, i edit the resolf.conf and add the task "search [domain]" but when i restart the network it disappeared. can somebody help me? sorry for my bad english thanks bad_killa...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    3

    RHE6.1 - domain entry disappeared


    Hallo,
    i edit the resolf.conf and add the task "search [domain]" but when i restart the network it disappeared. can somebody help me?

    sorry for my bad english

    thanks bad_killa

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    I assume you mean "resolv.conf", as in /etc/resolv.conf, yes?

    Look in your network config files for PEERDNS=yes and change them to PEERDNS=no, then restart networking and see if that helps. The likely network config file you'll need to edit is:

    /etc/sysconfig/network-scripts/ifcfg-eth0

    hth

  3. #3
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,914
    /etc/resolv.conf is overwritten when your computer is assigned network address details from DHCP. If you're using that, then you'll find that your changes to it directly will be overwritten.

    I'm not sure if RHEL6.1 still has the 'system-config-network' tool, which would allow you to specify this value in addition to the DHCP supplied options. It might also be possible to add your own search domain using NetworkManager if that's what you're using to connect to networks.

    If atreyu's solution doesn't help, you could try getting your search domain into the configuration of your DHCP server, although if you're trying to do this is at work, your IT support people might not allow you to make a change.
    Linux user #126863 - see http://linuxcounter.net/

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2011
    Posts
    3
    no i'm using not a dhcp adress it's a fixed adress in the dns. i also try to change PEERDNS=yes to PEERDNS=no and it also doesn't help

    edit: for those how would know for what i need this is because with my network-config i can ping ip adresses from other servers but not an hostname. when i write "search [domaine]" in the resolv.conf i can ping hostnames.

  6. #5
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Yeah, I can confirm on my RHEL 6.0 box that even with static ip assignment, PEERDNS="no" and NM_CONTROLLED="yes" (or "no"), that NetworkManager will overwrite /etc/resolv.conf upon restart.

    But I never use NetworkManager, in fact, I uninstall it. I use good old /etc/init.d/network instead. Try it and see (unless there is some reason you need NetworkManager):

    Code:
    service NetworkManager stop
    chkconfig NetworkManager off
    chkconfig network on
    service network restart

  7. #6
    Just Joined!
    Join Date
    Aug 2011
    Posts
    3
    thx a lot it works ok so i unistalled the NetworkManager and it works
    can close these thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •