On 2017-01-28 17:57, Thomas Haller wrote: > On Sat, 2017-01-28 at 17:29 +0100, Marcin Zajączkowski wrote: >> Hi, >> >> I would like to disable autoconnect for new wifi connections by >> default. >> I prefer to control when my device is connected to public/shared wifi >> which identity cannot be determined ultimately (aka fake networks >> with >> well known ssid). >> >> I know I can do it manually via UI or nmcli, but I would prefer to >> configure it once (in the way as cloned-mac-address in global >> configuration) and only enable autoconnect for well know (and >> properly >> configured - with certificates) networks. >> >> Two questions: >> 1. Is it currently possible? 'device' section doesn't seem to accept >> that property. > > It's not possible, only the properties mentioned in `man > NetworkManager.conf` support to have their default values overwritten. > > Note that these default-values are only a fallback setting. > That is, the connection is still fully determined by the client > (nmcli). But it may explicitly configure certain properties as > ~unspecified~ to allow for a fallback. > > In case of connection.autoconnect, it only allows for "yes" or "no". > There is no space to express ~unspecified~.
That was something I had suspected. Would it be hard to allow connection.autoconnect to be defined for the device to make it possible to change the default value (here - do not autoconnect by default) for *new* networks (and their implicitly created connections)? I realize it would not rather be a commonly used feature, but IMHO it would be a good companion to already implemented MAC spoofing support. >> 2. How can I read/list default configuration for new wifi connections >> (e.g. wifi.cloned-mac-address - nmcli allows that only for existing >> connections, not devices)? > > nmcli still shows you the value ~unspecified~, and that correct. The > value is only determined when needed -- which for example depends > on the device on which you activate the connection. > > It's not possible to see via D-Bus (clients) which value the server > would use when needed. > > Try: > /usr/sbin/NetworkManager --print-config Thanks. With that I can see global configuration of NM. Marcin -- http://blog.solidsoft.info/ - Working code is not enough _______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
