Results 1 to 5 of 5

Thread: Preserving /etc/resolv.conf

  1. #1
    Join Date
    Mar 2007
    Beans
    950

    Preserving /etc/resolv.conf

    I'm trying to set up a Samba-AD-DC and I've almost got it working.
    In order for it to work I need /etc/resolv.conf to point to the DNS server in samba.
    I can do that by editing /etc/resolv.conf,
    However every time I reboot the file gets overwritten.
    I have stopped and masked systemd-resolved.service.
    But it still get over written,
    I seem to recall the file that gets copied resides somewhere else. I could edit that.

  2. #2
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,306

    Re: Preserving /etc/resolv.conf

    You need to preset the data you want in dhclient.conf - for example with:
    prepend domain-name-servers 8.8.8.8;

  3. #3
    Join Date
    Mar 2007
    Beans
    950

    Re: Preserving /etc/resolv.conf

    OK I decided to:
    Code:
    chattrib +1 /etc/resolc.conf

  4. #4
    Join Date
    May 2010
    Beans
    1,200

    Re: Preserving /etc/resolv.conf

    Or add the ones you want to use in /etc/resolvconf/resolv .conf.d/head using the usual "nameserver x.y.a.b" line. Hacky but works

  5. #5
    Join Date
    Mar 2007
    Beans
    950

    Re: Preserving /etc/resolv.conf

    Yeah, I'm trying to get a SAMBA AD DC running. I am not really happy with any of the hacks. I'm leaning toward the anti-systemd camp.

Bookmarks

Posting Permissions

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