Where is NetworkManager's config?

Running Leap 16.1

https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/NetworkManager.conf.html
Says that the config is here:
/etc/NetworkManager/NetworkManager.conf, /etc/NetworkManager/conf.d/name.conf, /run/NetworkManager/conf.d/name.conf, /usr/lib/NetworkManager/conf.d/name.conf, /var/lib/NetworkManager/NetworkManager-intern.conf
But,

rpm -ql NetworkManager.x86_64
> rpm -ql NetworkManager.x86_64
/etc/NetworkManager
/etc/NetworkManager/VPN
/etc/NetworkManager/conf.d
/etc/NetworkManager/dispatcher.d
/etc/NetworkManager/system-connections
/usr/bin/nm-online
/usr/bin/nmcli
/usr/lib/NetworkManager
/usr/lib/NetworkManager/NetworkManager.conf
/usr/lib/NetworkManager/VPN
/usr/lib/NetworkManager/conf.d
/usr/lib/NetworkManager/dispatcher.d
/usr/lib/NetworkManager/dispatcher.d/nfs
/usr/lib/NetworkManager/dispatcher.d/no-wait.d
/usr/lib/NetworkManager/dispatcher.d/pre-down.d
/usr/lib/NetworkManager/dispatcher.d/pre-up.d
/usr/lib/firewalld
/usr/lib/firewalld/zones
/usr/lib/firewalld/zones/nm-shared.xml
/usr/lib/systemd/system-generators
/usr/lib/systemd/system-generators/nm-initrd-generator.sh
/usr/lib/systemd/system/NetworkManager-config-initrd.service
/usr/lib/systemd/system/NetworkManager-dispatcher.service
/usr/lib/systemd/system/NetworkManager-initrd.service
/usr/lib/systemd/system/NetworkManager-wait-online-initrd.service
/usr/lib/systemd/system/NetworkManager-wait-online.service
/usr/lib/systemd/system/NetworkManager.service
/usr/lib/systemd/system/NetworkManager.service.d
/usr/lib/systemd/system/nm-priv-helper.service
/usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d/NetworkManager.conf
/usr/lib/udev/rules.d/84-nm-drivers.rules
/usr/lib/udev/rules.d/85-nm-unmanaged.rules
/usr/lib/udev/rules.d/90-nm-thunderbolt.rules
/usr/lib64/NetworkManager
/usr/lib64/NetworkManager/1.54.3
/usr/lib64/NetworkManager/1.54.3/libnm-device-plugin-wifi.so
/usr/libexec/nm-daemon-helper
/usr/libexec/nm-dhcp-helper
/usr/libexec/nm-dispatcher
/usr/libexec/nm-initrd-generator
/usr/libexec/nm-libnm-helper
/usr/libexec/nm-priv-helper
/usr/sbin/NetworkManager
/usr/share/bash-completion/completions/nmcli
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.AccessPoint.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.AgentManager.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Checkpoint.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Connection.Active.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DHCP4Config.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DHCP6Config.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Adsl.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bluetooth.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bond.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bridge.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Dummy.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Generic.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Hsr.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.IPTunnel.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Infiniband.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Ipvlan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Loopback.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Lowpan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Macsec.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Macvlan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Modem.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.OlpcMesh.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.OvsBridge.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.OvsInterface.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.OvsPort.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Ppp.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Statistics.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Team.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Tun.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Veth.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Vlan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Vrf.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Vxlan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.WiMax.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.WifiP2P.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.WireGuard.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Wired.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Wireless.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Wpan.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DnsManager.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.IP4Config.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.IP6Config.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.PPP.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.SecretAgent.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Settings.Connection.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Settings.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.VPN.Connection.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.VPN.Plugin.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.WiMax.Nsp.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.WifiP2PPeer.xml
/usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.xml
/usr/share/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
/usr/share/dbus-1/system-services/org.freedesktop.nm_priv_helper.service
/usr/share/dbus-1/system.d/nm-dispatcher.conf
/usr/share/dbus-1/system.d/nm-priv-helper.conf
/usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf
/usr/share/doc/packages/NetworkManager
/usr/share/doc/packages/NetworkManager/AUTHORS
/usr/share/doc/packages/NetworkManager/ChangeLog
/usr/share/doc/packages/NetworkManager/NEWS
/usr/share/doc/packages/NetworkManager/TODO
/usr/share/doc/packages/NetworkManager/server.conf
/usr/share/licenses/NetworkManager
/usr/share/licenses/NetworkManager/COPYING
/usr/share/man/man1/nm-online.1.gz
/usr/share/man/man1/nmcli.1.gz
/usr/share/man/man5/NetworkManager.conf.5.gz
/usr/share/man/man5/nm-settings-dbus.5.gz
/usr/share/man/man5/nm-settings-keyfile.5.gz
/usr/share/man/man5/nm-settings-nmcli.5.gz
/usr/share/man/man5/nm-settings.5.gz
/usr/share/man/man5/nm-system-settings.conf.5.gz
/usr/share/man/man7/nmcli-examples.7.gz
/usr/share/man/man8/NetworkManager-dispatcher.8.gz
/usr/share/man/man8/NetworkManager-wait-online.service.8.gz
/usr/share/man/man8/NetworkManager.8.gz
/usr/share/man/man8/nm-initrd-generator.8.gz
/usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
/var/lib/NetworkManager
>

Tells me that no /etc/NetworkManager/NetworkManager.conf is installed, and it isn’t. But again, that also tells me a /usr/lib/NetworkManager/NetworkManager.conf is installed, but is all commented out anyway.
And,

sudo NetworkManager --print-config
> sudo NetworkManager --print-config
[sudo] password for readlegal: 
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf, /usr/lib/NetworkManager/conf.d/conncheck-openSUSE.conf

[main]
# plugins=
# rc-manager=auto
# migrate-ifcfg-rh=false
# auth-polkit=true
# dhcp=internal
# iwd-config-path=
configure-and-quit=no

[connectivity]
uri=http://conncheck.opensuse.org

[logging]
# backend=journal
# audit=false

[device]
# wifi.backend=wpa_supplicant

# no-auto-default file "/var/lib/NetworkManager/no-auto-default.state"
>

Tells me that uri=http://conncheck.opensuse.org and configure-and-quit=no are the only config perimeters loaded and uri=http://conncheck.opensuse.org comes from /usr/lib/NetworkManager/conf.d/conncheck-openSUSE.conf but, grepping /usr/, /var/ and /etc/ for configure-and-quit=no seems to tell me that it comes from nowhere…

So, where is(are) the (default) config (file(s)) for NetworkManager?

Thanks.

Some of NetworkManager’s behaviour is built in and doesn’t come from a configuration file. As man NetworkManager.conf mentions, NetworkManager does not require any configuration in NetworkManager.conf . If no configuration files are present, it uses its built-in defaults, with any distribution-supplied snippets (such as those under /usr/lib/NetworkManager/conf.d/ ) overriding or extending that behaviour. User overrides belong in /etc/NetworkManager/conf.d/ , not by modifying the distribution defaults.

More info:
man NetworkManager.conf

NetworkManager does not require any configuration in NetworkManager.conf. Depending on your use case, you may remove all files to restore the default configuration (factory reset).
But note that your distribution or other packages may drop configuration snippets for NetworkManager, such that they are part of the factory default.

1 Like

What about

man networkmanager.conf

on your system, that should tell you how it is on your system?

Good call @hcvv , I hadn’t checked the local man page, but it says the same as the freedesktop version in the op:

SYNOPSIS
       /etc/NetworkManager/NetworkManager.conf, /etc/NetworkManager/conf.d/name.conf, /run/NetworkManager/conf.d/name.conf,
       /usr/lib/NetworkManager/conf.d/name.conf, /var/lib/NetworkManager/NetworkManager-intern.conf

Read the bit that I copied straight from the manpage. :wink:

Apologies @deano_ferrari, I missed your post completely - thanks for the pointer!

1 Like

Erroneous info removed

? er, perplexed @knurpht
What’s erroneous (other than me missing a post) and what’s been removed?

My own. I assumed wrongly that I had an explanation, but verifying again showed me I was wrong. Could not remove the post.

Aah, what an embarrassing discussion this has been… :rofl:

But, @deano_ferrari I remain a wee bit confused - I assume the built in config is built in by SUSE so then, what’s the point of the vendor drop-ins, like uri=http://conncheck.opensuse.org - an afterthought?

Well, it’s a vendor-specific config. NetworkManager provides the upstream defaults, and distributions can add or override settings via vendor drop-ins as desired. The connectivity check URI is one such openSUSE-specific setting.

An example + reason I created the drop-in:

knurpht@Lenovo-P16:/etc/NetworkManager/conf.d> ls
90-no_conncheck.conf
knurpht@Lenovo-P16:/etc/NetworkManager/conf.d> more 90-no_conncheck.conf 
[connectivity]
enabled=false
knurpht@Lenovo-P16:/etc/NetworkManager/conf.d> 

A while ago the conncheck.opensuse.org machine was having issues resulting in my machines in continuous “Limited Connectivity” messages. Did some reading and this disables the connectivity check.

2 Likes

Not to forget:

Some “global” settings (e.g. MAC-randomization) can be overruled in individual connection files.

The stock NetworkManager.conf on Leap 16.1 is /usr/lib/NetworkManager/NetworkManager.conf. No copies elsewhere.

1 Like

Thanks @knurpht - that reminds me of the reason for the OP, I was a bit thrown by the discovery of the built in default config that @deano_ferrari describes - I assume that’s where configure-and-quit=no comes from.

But, I’m still grappling with -

That’s not a place listed in the manual for a config - so, by ‘stock’ is it meant that’s just an example config for users to copy to /etc/NetworkManager/NetworkManager.conf when they want to make their own changes - that’s where the context of the header comment in the file suggests it should be - in which case, why /etc/NetworkManager/conf.d/[name].conf? But then, the manual says user configs should go in conf.d because:

If a default NetworkManager.conf is provided by your distribution's packages, you should not modify it...

And also says:

Packages might install further configuration snippets to /usr/lib/NetworkManager/conf.d.

And, although SUSE does package NetworkManager, that’s only because it’s a distribution (vendor). So, I’m going to stick my neck right out and suggest:

  1. /usr/lib/NetworkManager/NetworkManager.conf is in the wrong place and should be at /etc/NetworkManager/NetworkManager.conf;
  2. What’s in /usr/lib/NetworkManager/conf.d/conncheck-openSUSE.conf should be in /etc/NetworkManager/NetworkManager.conf and;
  3. /usr/lib/NetworkManager/conf.d/conncheck-openSUSE.conf shouldn’t be at all and /usr/lib/NetworkManager/conf.d/ left for other packages - that is, packages that have a need to modify the default.

(Trouble with out stuck necks, they tend to get the chop… :open_mouth:)

/etc/ is used for User configuration, same as for systemd, ssh and many others more.

copy the files to /etc/xxx and change them there or use the conf.d directories in /etc for the changes.

Sorry, it is for System (Manager) configuration.

When it is about an (end-)user program, there also might be configuration files for each user in his/her ~/.config/

@hcvv

please qoute right:

when i want to change something to a configuration, I have to do it there.
That is for me User configuration.

Maybe I should write

systemwide.

PS:
A User can not write there…

Only root

Yes, and that makes it a system’s configuration.