0

I'm creating a custom OS for Rasberry Pi using pi-gen.

I decided to install NetworkManager to manage connection/reconnection to the default network interfaces (eth0 and wlan0).

I crafted 2 configuration files located at /etc/NetworkManager/system-connections as follow:

/etc/NetworkManager/system-connections/wifi:

[connection]
id=wifi
uuid=319f2d8e-3ce7-4e47-b6eb-fabb0aa69f68
type=wifi

[wifi]
mode=infrastructure
ssid=Facco

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=facco2016

[ipv6]
method=disabled

[ipv4]
method=auto

/etc/NetworkManager/system-connections/ethernet:

[connection]
id=ethernet
uuid=60d17e82-1be7-3d0f-b924-e980be41fcba
type=ethernet

[ipv6]
method=disabled

[ipv4]
method=auto

The 2 files worked perfectly.

After that I added the 2 configuration files to the OS repo and I generated the OS image.

Now when I start the OS I see the network-manager fine but the 2 files that I copied and pasted inside /etc/NetworkManager/system-connections are not seen at all by nmtui/nmtui-edit.

Shouldn't nmtui look inside the system-connection folder and find the file I pasted there?

Is there something I'm missing?

1

NetworkManager clients (like nmtui) never look at these files directly. They usually don't run as root and wouldn't have the permissions to read/modify them. Instead, they use NetworkManager's D-Bus API.

You are welcome to create connection profiles in the editor or pre-deploy them. That is, configuring files directly instead of using the D-Bus API is very much supported and what you try to do is fine.

Keyfile files (the connection profiles in/etc/NetworkManager/system-connections) must be owned by root and have permissions 0600. Check the files owner and permissions with ls -l and fix it with chown and chmod.

Less likely is that NetworkManager cannot access the files. Eg. we SELinux labels.

In any case, looking at NetworkManager's logfile would tell you why it doesn't load them. Check syslog/journal.

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.