NetworkManager/src/nmcli
Beniamino Galvani 50387acd4b nmcli: fix "device wifi connect" command with existing connection
Executing this command twice, or when a connection profile already
exists for the SSID:

  nmcli device wifi connect $SSID password $PASSWORD

returns error:

  Error: 802-11-wireless-security.key-mgmt: property is missing.

When setting the password nmcli was wiping the existing wireless
security setting.

Fixes: c8ff1b30fb ('nmcli/dev: use secret agent for nmcli d [wifi] connect')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1688
(cherry picked from commit 3a4e18e302)
2025-12-17 12:01:53 +01:00
..
agent.c cli: drop _NMC_RL_STARTUPHOOK_ARGS 2025-05-20 09:54:31 +02:00
common.c cli: drop _NMC_RL_STARTUPHOOK_ARGS 2025-05-20 09:54:31 +02:00
common.h cli: drop _NMC_RL_STARTUPHOOK_ARGS 2025-05-20 09:54:31 +02:00
connections.c nmcli: fix format 2025-07-09 15:08:15 +02:00
connections.h nmcli: connection: process port-type, type and controller first 2025-04-14 10:08:01 +00:00
devices.c nmcli: fix "device wifi connect" command with existing connection 2025-12-17 12:01:53 +01:00
devices.h src: drop most master references from the code 2024-08-09 15:47:32 +02:00
gen-metadata-nm-settings-nmcli.c ethtool: support Forward Error Correction(fec) 2024-11-07 17:38:04 +08:00
gen-metadata-nm-settings-nmcli.xml.in libnm-core: fix the documentation of the gateway IP property 2025-12-17 12:01:37 +01:00
general.c core: rename NM_STATE_ASLEEP to NM_STATE_DISABLED 2025-09-23 09:17:03 +02:00
meson.build nmcli: rename "generate-docs-nm-settings-nmcli" to "gen-metadata-nm-settings-nmcli" 2022-10-31 09:11:30 +01:00
nmcli-completion nmcli: fix argument completion if nmcli is aliased 2025-03-24 14:29:19 +00:00
nmcli.c core: rename NM_STATE_ASLEEP to NM_STATE_DISABLED 2025-09-23 09:17:03 +02:00
nmcli.h nmcli: move offline flag from NmCli to NmcConfig struct 2023-07-17 12:56:03 +02:00
polkit-agent.c nmcli: replace all uses of g_print()/g_printerr() with nmc_print()/nmc_printerr() 2023-02-08 10:11:18 +01:00
polkit-agent.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
settings.c nmcli: print to stderr where appropriate 2025-02-20 09:13:01 +00:00
settings.h nmcli: convert everywhere dhcp-send-hostname <-> dhcp-send-hostname-v2 2024-10-24 17:03:10 -04:00
utils.c nmcli: convert everywhere dhcp-send-hostname <-> dhcp-send-hostname-v2 2024-10-24 17:03:10 -04:00
utils.h format: run nm-code-format 2024-10-04 11:07:35 +02:00

nmcli

The command line user interface of NetworkManager. It uses the D-Bus API of NetworkManager (via libnm).

See:

  • man 1 nmcli ([www])
  • man 7 nmcli-examples ([www])
  • man 5 nm-settings-nmcli ([www])

Try also with bash-completion!