Feature #7622

Check if NetworkManager allows disabling the autoconnect parameter by default

Added by intrigeri 2014-07-20 14:13:48 . Updated 2020-05-12 19:14:45 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Persistence
Target version:
Start date:
2014-07-20
Due date:
% Done:

0%

Feature Branch:
Type of work:
Research
Blueprint:

Starter:
0
Affected tool:
Deliverable for:

Description

See parent ticket for the rationale.


Subtasks


History

#1 Updated by BitingBird 2015-01-03 04:12:56

http://manpages.ubuntu.com/manpages/utopic/man1/nmcli.1.html says :

nmcli dev disconnect iface em2
disconnects a connection on interface em2 and marks the device
as unavailable for auto‐connecting. That’s why no connection
will automatically be activated on the device until the device’s
“autoconnect” is set to TRUE or user manually activates a
connection.

#2 Updated by geb 2020-05-12 19:14:45

  • Status changed from Confirmed to Resolved

Unfortunately the proposed solution do not work is the device is not currently connected :

<code>
$ nmcli dev disconnect wlan0
Error: Device 'wlan0' (/org/freedesktop/NetworkManager/Devices/3) disconnecting failed: This device is not active
Error: not all devices disconnected.
</code>

Setting the device autoconnect property to no, seems a better option.

<code>
$ nmcli device set wlan0 autoconnect no
</code>

As of Network Manager 1.14.6 (2020 Q2), I did not found any other solution to acheive that. This parameter cannot be set in configuration. More details on Bug #7165.