Here is the problem I am trying to solve. I have a little appliance like server. It has no UI, but I tend to move it around. Sometimes I connect it with wifi and sometimes lan. Right now I have configured all three (wlan0, p1p1, p3p1) in /etc/network/interface to be dhcp. But that means the appliance takes a long time to boot. I poked around and people recommend using nmcli for servers like mine. It sounded like a good idea.
I first tried installing it with the following command:
sudo apt-get install network-manager
However that was going to install a ton of packages, most of them looked GUI related. So instead I tried the following command:
sudo apt-get install network-manager --no-install-recommends
That worked great, it has a small package list, didn't seem to include a bunch of unnecessary GUI packages.
But now when I run nmcli:
sudo nmcli c
I get this:
** (process:10709): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files Error: nmcli (0.9.8.0) and NetworkManager (unknown) versions don't match. Force execution using --nocheck, but the results are unpredictable.
Well okay I can run --nocheck:
sudo nmcli --nocheck c
But now I get the following output:
** (process:10738): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files Error: Can't obtain connections: settings service is not running.
It is not running? I tried to start it but there is no NetworkManager in /etc/init.d
Is running nmcli on Ubuntu server something people just recommend but have never tried? It does not seem to work.
Per steeldriver I was able to start network-manager with
sudo service network-manager start
For some reason network-manager did not start on boot, probably had something to do with the interfaces being half configured in the /etc/network/interfaces file.
Once interfaces were removed from /etc/network/interfaces file machine boots quickly and network-manager uses dhcp to bring up the plugged in interfaces.
However what I need to do is clone the mac address for one of the interfaces. I have a ubuntu laptop running 13.10 which I have done the same thing. I copied the file from the laptop to the appliance. But the appliance does not seem to detect the file.
Here is the file: /etc/NetworkManager/system-connections/Ethernet\ connection\ 1
[802-3-ethernet] duplex=full cloned-mac-address=14:DA:E9:B0:82:D7 [connection] id=Ethernet connection 1 uuid=da7dd579-235a-4588-a8ee-583d44a7b09d type=802-3-ethernet timestamp=1395512283 [ipv6] method=auto [ipv4] method=auto
But now if I try to list this connection then I get no results for it:
sudo nmcli c list NAME UUID TYPE TIMESTAMP-REAL Wired connection 1 e9765519-1188-4ef6-9153-77c8c99f59bf 802-3-ethernet Sat 22 Mar 2014 12:55:44 PM PDT
And if I try to connect to the connection it tells me it does not exist.
sudo nmcli c up uuid da7dd579-235a-4588-a8ee-583d44a7b09d Error: Unknown connection: da7dd579-235a-4588-a8ee-583d44a7b09d.