Score:0

Network configuration does not reflect the NetworkManager profile

ve flag

In Ubuntu 22.04, I created a NetworkManager profile called netplan-enp2s0.nmconnection:

[connection]
id=netplan-enp2s0
uuid=7ea6f90b-3495-3533-948a-ef0035687c34
type=ethernet
interface-name=enp2s0
permissions=
timestamp=1634026237

[ethernet]
mac-address-blacklist=
wake-on-lan=0

[ipv4]
address1=192.168.0.100/16,192.168.0.254
dns=192.168.0.254;8.8.8.8;4.4.4.4;
dns-search=
ignore-auto-dns=true
method=manual

[ipv6]
addr-gen-mode=eui64
dns-search=
method=ignore

[proxy]

The profile is enabled and active:

$ nmcli con show
NAME            UUID                                  TYPE      DEVICE 
netplan-enp2s0  7ea6f90b-3495-3533-948a-ef0035687c34  ethernet  enp2s0 

But even issuing:

$ sudo nmcli con up netplan-enp2s0

its content is ignored:

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:30:18:05:87:36 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.17/16 brd 192.168.255.255 scope global dynamic noprefixroute enp2s0
       valid_lft 82426sec preferred_lft 82426sec
    inet6 fe80::230:18ff:fe05:8736/64 scope link 
       valid_lft forever preferred_lft forever

and also the GUI shows the outdated settings:

enter image description here

If I change the settings in the GUI it creates a new profile instead of updating the existing one.

What is my mistake?

UPDATE

Here the diff against the profile crated by the GUI (right side):

$ sudo diff netplan-enp2s0.nmconnection netplan-enp2s0-7ea6f90b-3495-3533-948a-ef0035687c34.nmconnection 
6,7c6
< permissions=
< timestamp=1634026237
---
> timestamp=1666184508
10d8
< mac-address-blacklist=
15,17d12
< dns-search=
< ignore-auto-dns=true
22d16
< dns-search=
Esther avatar
es flag
what is the ownership/permissions on the profile? from https://developer-old.gnome.org/NetworkManager/stable/nm-settings-keyfile.html : "For security, it will ignore files that are readable or writable by any user other than 'root' since private keys and passphrases may be stored in plaintext inside the file."
ve flag
@Esther yes, they are `rw` only for `root`: `rw------- 1 root root`
Esther avatar
es flag
how do the manual profile and the one generated by the GUI compare? are there any differences?
ve flag
@Esther question updated
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.