You are not logged in.

#1 2023-02-22 15:20:31

Nico371
Member
Registered: 2022-06-07
Posts: 19

wpa_cli can't save/save_config

I am unable to work with wpa_cli:
- The interface will only open if I use "sudo wpa_cli"
- Even with "update_config=1" in "/etc/wpa_supplicant/wpa_supplicant.conf", I can't save nor save_config
- I have a network manually added in the config file:

ctrl_interface=/run/wpa_supplicant
update_config=1

network={
ssid="Alumnos"
psk="password"
key_mgmt=WPA-EAP
eap=PEAP
identity="nucieda-"
password="[my password]"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
mesh_fwding=1
}

Also, as you might guess, running list_networks in wpa_cli shows no networks at all
Every post about this has the solution being to add "update_config=1", but I already have that, so I just don't know what to do

Last edited by Nico371 (2023-02-23 07:48:00)

Offline

#2 2023-02-22 15:25:58

Nico371
Member
Registered: 2022-06-07
Posts: 19

Re: wpa_cli can't save/save_config

Adding some info:
I can manually add another network with all the fields filled in. When I enable it, it shows the connection was completed; however I am not connected to any network

Offline

#3 2023-02-22 15:27:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: wpa_cli can't save/save_config

Wpa_cli would typically only be run as root.  If you want to run it as a regular user, you'd need to change permissions on your wpa_supplicant.conf.  What are the permissions currently (i.e., output of `ls -l /etc/wpa_supplicant/wpa_supplicant.conf`)

EDIT: in your second post what do you mean by "I am not connected to any network"?  Post the output of actual commands, not your interpretation.

Last edited by Trilby (2023-02-22 15:28:09)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2023-02-22 15:28:04

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: wpa_cli can't save/save_config

wpa_supplicant will only make the connection, similar to plugging in a cable, you still need to configure the network on the OS side with something else.

Offline

#5 2023-02-22 15:43:33

Nico371
Member
Registered: 2022-06-07
Posts: 19

Re: wpa_cli can't save/save_config

Sorry,
Here are the permissions:

-rw-r--r-- 1 root root 232 Feb 22 15:40 /etc/wpa_supplicant/wpa_supplicant.conf

Sorry about the not connection issue, I was just saying that it wouldn't connect even after selecting it in wpa_cli:

<3>CTRL-EVENT-EAP-STATUS status='remote certificate verification' parameter='success'
<3>CTRL-EVENT-EAP-STATUS status='completion' parameter='success'
<3>CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
<3>PMKSA-CACHE-ADDED 5c:5a:c7:ea:8b:6e 1
<3>WPA: Key negotiation completed with 5c:5a:c7:ea:8b:6e [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 5c:5a:c7:ea:8b:6e completed [id=1 id_str=]
<3>CTRL-EVENT-DISCONNECTED bssid=5c:5a:c7:ea:8b:6e reason=0
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>SME: Trying to authenticate with 5c:5a:c7:f2:78:ae (SSID='Alumnos' freq=5500 MHz)
<3>Trying to associate with 5c:5a:c7:f2:78:ae (SSID='Alumnos' freq=5500 MHz)
<3>Associated with 5c:5a:c7:f2:78:ae
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-DISCONNECTED bssid=5c:5a:c7:f2:78:ae reason=0
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>SME: Trying to authenticate with 5c:5a:c7:e2:35:ae (SSID='Alumnos' freq=5220 MHz)
<3>Trying to associate with 5c:5a:c7:e2:35:ae (SSID='Alumnos' freq=5220 MHz)
<3>Associated with 5c:5a:c7:e2:35:ae
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-DISCONNECTED bssid=5c:5a:c7:e2:35:ae reason=3 locally_generated=1
<3>PMKSA-CACHE-REMOVED 5c:5a:c7:ea:8b:6e 1
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-NETWORK-REMOVED 0
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>CTRL-EVENT-NETWORK-ADDED 2
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>SME: Trying to authenticate with 1e:9e:cb:54:c5:dc (SSID='Banana' freq=2437 MHz)
<3>Trying to associate with 1e:9e:cb:54:c5:dc (SSID='Banana' freq=2437 MHz)
<3>Associated with 1e:9e:cb:54:c5:dc
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>WPA: Key negotiation completed with 1e:9e:cb:54:c5:dc [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 1e:9e:cb:54:c5:dc completed [id=2 id_str=]
<3>CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-32 noise=9999 txrate=52000 

I think it tries to connect to the network I want it to connect to "Alumnos" but gives up after trying and reconnects to my hotspot "Banana"

I use NetworkManager to configure my networks, but it's possible I'm doing it wrong

Also still can't save or save_config in wpa_cli

Last edited by Nico371 (2023-02-23 07:46:08)

Offline

#6 2023-02-22 17:37:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: wpa_cli can't save/save_config

Please edit your post to add code tags around commands/output

Nico371 wrote:

I use NetworkManager to configure my networks, but it's possible I'm doing it wrong

Likely.  If you want help with that, you'll have to describe how you're trying to do it.  You only shared a highly redacted config snippet with only one of those two networks.  Feel free to remove any passwords, but no other content of wpa_supplicant.conf is even remotely sensitive.

Nico371 wrote:

Also still can't save or save_config in wpa_cli

Are you still running it as a regular user?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-02-23 07:45:16

Nico371
Member
Registered: 2022-06-07
Posts: 19

Re: wpa_cli can't save/save_config

I am running wpa_cli with

sudo wpa_cli

I'm fairly certain I have Network Manager set up correctly, as I can connect to other networks fine

Edit: added code tags to all previous posts/comments, sorry about that

Edit 2: would doing something like

chmod 666 /etc/wpa_supplicant/wpa_supplicant.conf

make it so I can use save/save_config?

Last edited by Nico371 (2023-02-23 07:49:48)

Offline

#8 2023-02-23 09:12:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: wpa_cli can't save/save_config

What exactly are you trying to fix (your real problem, nothing to do with wpa_cli)? If you are using networkmanager then wpa_cli as well as the wpa config file is irrelevant since NetworkManager will handle that on it's own and it is in fact detrimental if you are trying to mess around with wpa_cli while NetworkManager is intending to handle the connection.If you are indeed trying to use  networkmanager and are looking for a cli way to change connections then there's nmcli and nmtui.

All of the connection settings you are trying to fix here, should be done from/via NetworkManager instead if you are using that:

Last edited by V1del (2023-02-23 09:16:24)

Offline

#9 2023-02-23 09:50:32

Nico371
Member
Registered: 2022-06-07
Posts: 19

Re: wpa_cli can't save/save_config

Ok, I'm more than happy to ignore wpa_cli if I can use Network Manager to do it.
I'm not sure how to configure the network I'm joining, this is my current /etc/NetworkManager/system-connections/Alumnos.nmconnection:

[connection]
id=Alumnos
uuid=ef85cf95-0ced-4a2d-9034-5cf297dc8140
type=wifi
interface-name=wlp0s20f3
metered=2

[wifi]
mac-address=28:D0:EA:F0:7A:12
mode=infrastructure
ssid=Alumnos

[wifi-security]
key-mgmt=wpa-eap

[802-1x]
eap=peap;
identity=nucieda-
password=[my password]
phase1-peapver=0
phase2-auth=mschapv2

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]

When I run

nmcli dev wifi Alumnos

, however, from what I've tried (I'm not at the location at the moment), it doesn't work. It also gives me a warning like "WEP encryption is known to be unsafe" (not sure exactly what it was)
I'll be going there in a couple hours, so I'll post the exact output and logs, but if you see anything obvious, let me know please smile

Also, there were some fields I did not fill out, maybe it had something to do with that?
BSSID
CLoned MAC Address
Anonymous Identity
Domain

Offline

#10 2023-02-23 10:03:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: wpa_cli can't save/save_config

You can especially not use NM and wpa_cli at the same time.

it doesn't work. It also gives me a warning like

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

This is probably some https://wiki.archlinux.org/title/Networ … ss#eduroam ?
Does the institution provide any information on the setup and/or maybe even require a certificate?

Offline

#11 2023-02-23 10:20:55

Nico371
Member
Registered: 2022-06-07
Posts: 19

Re: wpa_cli can't save/save_config

Please don't paraphrase

Like I said, I don't have the means right now to provide the exact outputs, but as soon as I do I will edit my original post

It's not eduroam, I have that working at my university

Does the institution provide any information on the setup and/or maybe even require a certificate?

I'm fairly certain they don't provide a certificate, as I got my information

network={
ssid="Alumnos"
psk="password"
key_mgmt=WPA-EAP
eap=PEAP
identity="nucieda-"
password="[my password]"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
mesh_fwding=1
}

from someone who says they're able to connect with that
I will, however, ask about it and see what they're able to tell me

Offline

Board footer

Powered by FluxBB