45

Using NetworkManager on Arch Linux on a MacBookPro14,3, I am unable to connect to any wireless network. I've tried connecting to a number of different WiFi networks (home, mobile hotspot, work) all with the same result. I've tried doing this with both nmcli and nmtui. Example:

$ nmcli dev wifi connect <SSID> password <password>
Error: Connection activation failed: (7) Secrets were required, but not provided.

Looking at logs with journalctl shows:

wpa_supplicant[PID]: wlp3s0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16

and

NetworkManager[PID]: <info> [TIMESTAMP] device (wlp3s0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')

The Macbook has a Broadcom BCM43602 with driver brcmfmac. NetworkManager and wpa_supplicant are installed and enabled.

2
  • This appears to be related: askubuntu.com/q/1196348/327339. Commented Aug 30, 2020 at 8:00
  • Note to future readers. This problem absolutely can be caused by hardware issues, as it just was for me. YES! Even if you can otherwise use your adapter for things like seeing an SSID, it still can be broken. Just FYI... having a spare adapter is worth it's weight in gold.
    – Charlie
    Commented Nov 3, 2023 at 3:01

16 Answers 16

52

It seems that NetworkManager automatically reuses an existing connection. In case your existing connection does not have any secrets stored, the new connection attempt will not update the existing connection and fail due to missing secrets. So in my case these steps helped:

nmcli con delete <SSID>

Then reconnect using

nmcli dev wifi connect <SSID> password <password>
2
  • 10
    This just shows the same error message again. Does not help. (Newly setup Orange Pi Zero with Armbian Bionic)
    – ygoe
    Commented May 31, 2020 at 10:28
  • maybe try specifying the ifname: nmcli dev wifi connect <SSID> password <password> ifname wlan0
    – khaverim
    Commented Dec 15, 2023 at 18:00
18

Try turning the WiFi off and on again like this:

nmcli r wifi off to turn it off.

nmcli r wifi on to turn it on.

Check the available WiFi networks: nmcli d wifi list

Check and disconnect the WiFi that appears green:

nmcli con to check.

nmcli con down <wifi name> to disconnect.

If you don't know for sure if the password you provided is right, connect again:

nmcli dev wifi con "wifi name" password "wifi password"

Nota bene: Don't forget the "" on the name and the password.

Or try to reconnect to the WiFi: nmcli con up <wifi name>

Sometimes the problem is the connection with NetworkManager. If it's not working, let me know!

1
  • nmcli con up <wifi name> worked. also changed the name of the 5 GHz band so that there is less chance to hiccup the NetworkManager.
    – MrMeszaros
    Commented Jan 28, 2021 at 18:03
17

Next solved my problem, was taken from: https://www.youtube.com/watch?v=P7bAp4vBxnA

  • Edit with sudo grants: /etc/NetworkManager/NetworkManager.conf

  • Add the next two lines:

 [device]
 wifi.scan-rand-mac-address=no
  • Execute: sudo systemctl restart NetworkManager

  • Use your WiFi. ;)

6
  • I had the same problem again after the first valid connection with the above "solution". Commented May 18, 2019 at 15:41
  • Related - unix.stackexchange.com/questions/395059/….
    – slm
    Commented Jul 27, 2020 at 5:18
  • 1
    This solved my problem. Commented Mar 31, 2021 at 11:44
  • This fixed an issue for me where it would say "No Wi-Fi adapter found" in the GNOME settings UI for me. Now onto Bluetooth.... Commented Nov 1, 2021 at 22:22
  • 1
    @MedardoRodriguez You should also explain why it helped: Did you allow only a specific MAC to access your WiFi?
    – U. Windl
    Commented Jan 25, 2022 at 7:57
3

Have absolutely no idea what the error message means... But I did just encounter the dreaded:

Error: Connection activation failed: (7) Secrets were required, but not provided.

For me, I'm using a BT Home Hub (in the UK). Which has a feature that attempts to be clever, and combine the 2.4GHz and 5GHz bands together, and upon a device requesting a connection, deciding which band it would be best off connecting to.

This is a terrible idea, for many many reasons, but anyway. Upon logging on to my Home Hub through another device (http://192.168.1.254/gui/#/advancedWifi/configuration) There was a button called "Seperate Bands", which when turned on allowed me to get two SSIDs, one for 2.4GHz, and the other for the much faster 5GHz.

Once I could differentiate between the two bands via SSID, bingo. nmcli would connect!

sudo nmcli -a d wifi connect BTHub6-XXXX-5

I'm assuming that nmcli see's that there are two identical SSID's but for different channels/bands, can't decide which to connect to, and complains it doesn't have enough info.

Not sure if this will work for everyone's situation, but it's worth investigating if you have a 5GHz router, and only see one SSID when scanning on your phone/laptop/whatever.

1
  • I think think if both bands use the same SSID they should use the same password, too. Also if the credentials are not stored, chnaging the band will cause a failed connectioin. In Germany the 5GHz band frequently pauses for RADAR checks and similar, so clever devices will move to the 2.4GHZ band. Today with mesh this is called "band steering" and client are probably expected to mave smooth transitions between APs.
    – U. Windl
    Commented Jan 25, 2022 at 8:01
3

I solved this annoying problem by first removing all connections:

nmcli --fields UUID,TIMESTAMP-REAL con show | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done

And then connect.

1
  • I think this may have saved me trying to remotely configure a headless raspberry pi's wifi over bluetooth and getting this error.
    – bsautner
    Commented Sep 28, 2023 at 20:37
2

Yesterday I faced the same issue, In my case the root cause was KDE wallet which ceased working since an upgrade (from 18.04 LTS to 20.04 LTS). So the solution in my case was creating new wallet and make it default. After that I could finally and successfully login to my WIFI network.

2
  • Thanks. Worked. Guess this is problem with 20.04 kubuntu. Checking if upgrading solves this.
    – coderDude
    Commented May 29, 2021 at 19:41
  • @smoczyna Some detail why the wallet had failed after the upgrade would be just as helpful as explaining what the wallet has to do with WLAN.
    – U. Windl
    Commented Jan 25, 2022 at 8:05
1

secret required is bssid, so you can try:

nmcli device wifi connect <ssid> password <password> bssid <bssid number>

sometimes works, but usually fails..

so, create or edit a connection and add the bssid. it's easy with nmtui. then:

nmcli connect up <connection>
3
  • For some reason, adding bssid argument solved it for me
    – Typewar
    Commented Sep 12, 2021 at 13:24
  • 2
    @nave A bit more explanation would improve the answer. For example explain what the BSSID is, and what it is used for. Comments like "sometimes works, but usually fails." leave the impression you are not quite sure what you are actually doing.
    – U. Windl
    Commented Jan 25, 2022 at 8:03
  • BSSID doesn't make any difference.
    – parsley72
    Commented May 23, 2022 at 20:01
1

I am using alpine linux, at first using iwconfig to connect wifi as this is the default for alpine desktop.

When I install NetworkManager and using nmcli, I got that error.

This is what I do to make it work: edit /etc/network/interface

comment all except:

auto lo
iface lo inet loopback

stop network service:

rc-service networking stop

prevent it start at boot:

rc-update del networking boot

remove wpa_supplicant config:

rm /etc/wpa_supplicant/wpa_supplicant.conf

restart wpa_supplicant & NetworkManager service

adjust it with your distro. That's it.

Hope this help.

fyi: I got this idea from archwiki:

https://wiki.archlinux.org/index.php/NetworkManager#Enable_NetworkManager

Note: You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict.

1

We had a similar problem with an embedded development board, and the problem was that we had not connected the antenna properly! It fails at the authentication step likely due to not being able to transmit replies to the authentication challenges.

Make sure your hardware is correctly connected if you're seeing this error in an embedded device!

1
  • Similar problem here with similar system (Le Potato SBC) My problem was that I was using one of those mini WiFi stubby adapters. I don't know if it was deteriorated or damaged, but, after struggling with the above problem for almost an hour, I happened to notice while moving things around that the adapter was uncomfortable warm... also the light wasn't coming on. Well... turns out the antenna was some electroplating on the inside of the plastic cap part of the stub, and it was so loose it was practically coming off. I tossed that adapter out, and installed a known good unit... instant success!
    – Charlie
    Commented Nov 3, 2023 at 2:54
0

For first time use nmtui to connect to wifi.

1
  • Please explain your answer!
    – U. Windl
    Commented Jan 25, 2022 at 8:06
0

I got this when trying to configure 'eduroam', which involves WPA2 Enterprise certificates and whatnot. I couldn't quite get it to work, but more strangely, my previous, local wifi connection would fail to come back up. After much struggling about, the solution was nmcli con del eduroam, after which the other network worked normally again.

TL;DR: failure to connect may be due to the presence of a different, misconfigured connection. I consider this a bug in NetworkManager.

0

I'm not entirely sure what was causing it, but I fixed this by logging in to my router and deleting my laptop from its list of devices, then reconnecting.

1
  • Could be that some routers have problems when one MAC uses different client IDs, like dual-booting OSs, or booting a live system from a stick. However I'm not sure whether this causes the error message shown in the question.
    – U. Windl
    Commented Jan 25, 2022 at 8:09
0

After an update of Kubuntu 20.04 I encountered the same problem. The cause was KDE wallet. Creating an new wallet let me connect to wifi again, but after a reboot the problem came back. My final solution is:

  • Create a new wallet with empty password from KWallet, set as default.
  • Reboot, delete other wallets from KWalletManager.
  • Connect wifi, enter password, still not working.
  • Reboot. This time the wifi is automatically connected.
0

I had problems connecting to my 2.4GHz access point and solved it like this (same goes with 5 GHz):

  1. type nm-connection-editor in terminal,
  2. open the settings of the wanted (2.4GHz or 5GHz) WiFi connection,
  3. change the Band option from Automatic to B/G (2.4 GHz) for 2.4GHz option or A (5GHz) for 5GHz option.

I think the network manager prioritized 5 GHz over 2.4 GHz when set to automatic Band option.

0

There was a similar problem with Kubuntu 20.04 and TP-link Archer T2Plus adapter after updating. If you have installed a driver from this repo https://github.com/aircrack-ng/rtl8812au.git - reinstall the driver from v5.13.6 branch, reboot)

0

I was getting the same error while using that command.

What worked for me:

  1. If you have not ever connected to the wifi network you want to connect, issue this command first, otherwise the second command won't work:
$ nmcli device wifi connect <SSID>

You can list available SSIDs by pressing TAB key twice.
This command may give the same error OP wrote (which is fine). The error appears because the command uses GUI dialog to ask for password.

  1. Now issue this command and enter the wifi password in the terminal when asked:
$ nmcli connection up <SSID> --ask

KDE Neon update problem:

I was updating my KDE Neon system and the system got disconnected from internet mid download, and things went wrong somehow. None of the system programs were opening, not even Settings and konsole. When I restarted, the GUI didn't start at all, dropping in the terminal. Then I executed the below listed commands to connect to wifi and update my system.

Note: I connected to WPA2P protected Mobile Wifi Hotspot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .