I'm following this tutorial for making an Ubuntu active directory domain controller with Samba.

The problem I have run into, is that he is using Ubuntu Server 13.10, and I am using the latest, 18.04. Somewhere between these 2 versions, Ubuntu stopped using /etc/network/interfaces and started using netplan.

Therefore, when he says to modify /etc/network/interfaces, and add:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

dns-search <domain name>.local

I get an error message that says:

ifupdown has been replaced by netplan(5) on this system.

I did some research, and found that now this should be stored in /etc/netplan/01-netcfg.yaml. This file does not exist. Should I create it? Also, what is the equivalent of what he said to put in the file, for netplan?

Edit: The output for ls /etc/netplan is 50-cloud-init.yaml, and the output for cat /etc/netplan/*.yaml is:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
            addresses: []
            dhcp4: true
            optional: true
    version: 2
  • 1
    Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml Welcome to Ask Ubuntu. – chili555 Jul 3 '18 at 0:32
  • @chili555 I edited it with the information you requested. Thanks – user7391836 Jul 3 '18 at 1:22
  • Is this a cloud instance or a virtual machine or a simple (home?) server? – chili555 Jul 3 '18 at 20:31
  • Currently it's a virtual machine, but if it works, I will configure an actual server the same way. – user7391836 Jul 3 '18 at 20:37
  • Convert to a simple (home?) server or a cloud instance? – chili555 Jul 3 '18 at 20:43

First, let’s follow the recommendation included in the 50-cloud-init.yaml file. Please open a terminal and do:

sudo -i
echo "network: {config: disabled}"  >  /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Next, let’s remove the file and simultaneously back it up:

sudo mv /etc/netplan/50-cloud-init.yaml  ~/50-cloud-init.yaml

Next, verify the ethernet interface name with the command:


Substitute the interface you found below if not enp0s3.

Now let’s write a new file:

sudo nano /etc/netplan/01-netcfg.yaml

Write the following:

  version: 2
  renderer: networkd
          search: [<domain name>.local]
          addresses: [,]

Spacing, indentation, etc. are crucial and must be exact. Proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor.

Now do:

sudo netplan apply


| improve this answer | |
  • It worked for me when I changed the "1" in addresses: [,] to a "2", to match Is that a typo or is it supposed to be different? – user7391836 Jul 4 '18 at 23:12
  • 1
    I simply transferred your numbers from your original question. I assumed, guessed, really, that you used hypothetical numbers in your question. In fact, I suspect that the DNS nameserver should be Glad it's working! – chili555 Jul 4 '18 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.