Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
0
answers
24
views
The "dbus_connection_read_write_dispatch" is better to be invoked from timer or thread?
Not sure how wpa_supplicant is using the "dbus_connection_read_write_dispatch" API while it communicate with NetworkManager? Should I use "dbus_connection_read_write_dispatch" API driven from timer or the thread for my RPI system which would be better option in terms of overall performance point of...
Not sure how wpa_supplicant is using the "dbus_connection_read_write_dispatch" API while it communicate with NetworkManager?
Should I use "dbus_connection_read_write_dispatch" API driven from timer or the thread for my RPI system which would be better option in terms of overall performance point of view? Please guide.
Thanks,
Vikas
VikHere
(3 rep)
Jan 14, 2025, 07:25 PM
13
votes
4
answers
21262
views
Cannot connect to WiFi with nmcli, although secrets are provided
I am using `nmcli` on ArchLinux (version 1.14.5dev+17+gba83251bb-1 from the official package repository) to connect to wifi. This works perfectly for all wireless networks apart from this one Vodafone EasyBox network. Trying to activate the connection with the correct password gives me the following...
I am using
nmcli
on ArchLinux (version 1.14.5dev+17+gba83251bb-1 from the official package repository) to connect to wifi. This works perfectly for all wireless networks apart from this one Vodafone EasyBox network.
Trying to activate the connection with the correct password gives me the following error message:
Passwords or encryption keys are required to access the wireless network 'EasyBox-123456'.
Warning: password for '802-11-wireless-security.psk' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed: Secrets were required, but not provided
However, 802-11-wireless-security.psk
is stored, as you can see here:
$ nmcli con show EasyBox-123456
connection.id: EasyBox-123456
connection.uuid:
connection.stable-id: --
connection.type: 802-11-wireless
connection.interface-name: --
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
802-11-wireless.ssid: EasyBox-123456
802-11-wireless.mode: infrastructure
802-11-wireless.band: --
802-11-wireless.channel: 0
802-11-wireless.bssid: --
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address:
802-11-wireless.cloned-mac-address: --
802-11-wireless.generate-mac-address-mask:--
802-11-wireless.mac-address-blacklist: --
802-11-wireless.mac-address-randomization:default
802-11-wireless.mtu: auto
802-11-wireless.seen-bssids: --
802-11-wireless.hidden: no
802-11-wireless.powersave: 0 (default)
802-11-wireless.wake-on-wlan: 0x1 (default)
802-11-wireless-security.key-mgmt: wpa-psk
802-11-wireless-security.wep-tx-keyidx: 0
802-11-wireless-security.auth-alg: open
802-11-wireless-security.proto: --
802-11-wireless-security.pairwise: --
802-11-wireless-security.group: --
802-11-wireless-security.pmf: 1 (disable)
802-11-wireless-security.leap-username: --
802-11-wireless-security.wep-key0:
802-11-wireless-security.wep-key1:
802-11-wireless-security.wep-key2:
802-11-wireless-security.wep-key3:
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type: unknown
802-11-wireless-security.psk:
802-11-wireless-security.psk-flags: 0 (none)
802-11-wireless-security.leap-password:
802-11-wireless-security.leap-password-flags:0 (none)
802-11-wireless-security.wps-method: 0 (default)
802-11-wireless-security.fils: 0 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-duid: --
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
I tried several things, including restart NetworkManager/wpa-supplicant, the router, and disabling PMF, but nothing worked.
Specifying --ask
asks me for a password, but gives me the same error message afterwards. Removing and recreating the connection using nm-connection-editor
didn't work either. It works without any problems on my Android device.
**How can I connect to this Network?**
msrd0
(520 rep)
Nov 16, 2018, 05:53 PM
• Last activity: Nov 1, 2024, 07:37 PM
7
votes
2
answers
3000
views
Can I connect to a hidden wifi without knowing the ESSID?
**Is it theorically possible to connect to a hidden wifi without giving the ESSID?** The way I connect to a hidden wifi requires to give an SSID (`nmcli` refuses to have a blank `802-11-wireless.ssid` field). nmcli con add type wifi con-name ifname wlan0 ssid nmcli con modify wifi-sec.key-mgmt wpa-p...
**Is it theorically possible to connect to a hidden wifi without giving the ESSID?**
The way I connect to a hidden wifi requires to give an SSID (
nmcli
refuses to have a blank 802-11-wireless.ssid
field).
nmcli con add type wifi con-name ifname wlan0 ssid
nmcli con modify wifi-sec.key-mgmt wpa-psk
nmcli con modify wifi-sec.psk
user123456
(5258 rep)
Jan 4, 2017, 07:41 PM
• Last activity: May 27, 2024, 01:48 PM
46
votes
2
answers
66971
views
Hiding passwords in wpa_supplicant.conf with WPA-EAP and MSCHAP-v2
My `wpa_supplicant.conf` looks like this: network={ ssid="Some name" scan_ssid=1 key_mgmt=WPA-EAP eap=PEAP identity="my-user-id" password="(clear text password here)" ca_cert="/usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt" phase2="auth=MSCHAPV2" } With this specific combination of WPA-EA...
My
wpa_supplicant.conf
looks like this:
network={
ssid="Some name"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="my-user-id"
password="(clear text password here)"
ca_cert="/usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt"
phase2="auth=MSCHAPV2"
}
With this specific combination of WPA-EAP and MSCHAP-v2, is there a way to not include my password in clear in this configuration file?
The ChangeLog seems to [claim that this *is feasible*](https://w1.fi/cgit/hostap/tree/hostapd/ChangeLog#n790) (since 2005!):
* added support for storing EAP user password as NtPasswordHash instead
of plaintext password when using MSCHAP or MSCHAPv2 for
authentication (hash:); added nt_password_hash
tool for hashing password to generate NtPasswordHash
Some notes:
* Using a different password is not an option, as I have no control over this network (this is a corporate network, and a single username/password is used to access all services, including connecting to the Wifi).
* A word about duplicates:
* [40: use-wpa-supplicant-without-plain-text-passwords](https://unix.stackexchange.com/questions/40/use-wpa-supplicant-without-plain-text-passwords) is about pre-shared keys
* [74500: wpa-supplicant-store-password-as-hash-wpa-eap-with-phase2-auth-pap](https://unix.stackexchange.com/questions/74500/wpa-supplicant-store-password-as-hash-wpa-eap-with-phase2-auth-pap) uses PAP as phase-2 authentication (not MSCHAP-v2).
* [85757: store-password-as-hash-in-wpa-supplicant-conf](https://unix.stackexchange.com/questions/85757/store-password-as-hash-in-wpa-supplicant-conf) is very similar to this question, but was (incorrectly) closed as a duplicate of (https://unix.stackexchange.com/questions/74500/wpa-supplicant-store-password-as-hash-wpa-eap-with-phase2-auth-pap) ; unfortunately, the answers given to the purported duplicate are specific to PAP, and do not apply to the MSCHAP-v2 case. (https://unix.stackexchange.com/questions/85757/store-password-as-hash-in-wpa-supplicant-conf) itself has an answer claiming that it's essentially impossible regardless of the protocol, but the justification is invalid1
1 That anser claims that using a hashed password means that the hash becomes the password. This is technically true, but at least the hash is a *wifi-only* password, which is significant progress over leaking a shared password granting access to *multiple* services.
Clément
(632 rep)
Apr 25, 2016, 02:41 PM
• Last activity: Mar 14, 2024, 04:02 AM
12
votes
2
answers
7884
views
How to view the WPA2 PEAP certificate offered by an AP?
I have to connect to a WPA2 Enterprise network which only works if I don't verify the certificate. I would prefer not to do this, because this way anyone can see the MSCHAPv2 messages. The first step to fixing this would be looking at the certificate offered by the AP, then configuring wpa_supplican...
I have to connect to a WPA2 Enterprise network which only works if I don't verify the certificate. I would prefer not to do this, because this way anyone can see the MSCHAPv2 messages.
The first step to fixing this would be looking at the certificate offered by the AP, then configuring wpa_supplicant to only trust that one. But I don't know how to get the certificate. The wpa_cli "status" command doesn't show it and it's not in any logs.
I'm also curious about which SSL/TLS cipher suites are used. Is it possible to connect manually, maybe with openssl s_client?
stribika
(5564 rep)
Dec 30, 2016, 02:14 AM
• Last activity: Feb 21, 2024, 12:29 AM
0
votes
1
answers
1033
views
hostapd: I want wpa3 only..but enable WEP!
I start hostapd for wpa3 only auth. interface=wlan0 bridge=br0 driver=nl80211 ssid=mysid hw_mode=g channel=6 wpa=2 wpa_passphrase=iforgotit wpa_key_mgmt=SAE rsn_pairwise=CCMP But when I do the scan nmcli device wifi list it report...WEP! nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL...
I start hostapd for wpa3 only auth.
interface=wlan0
bridge=br0
driver=nl80211
ssid=mysid
hw_mode=g
channel=6
wpa=2
wpa_passphrase=iforgotit
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
But when I do the scan
nmcli device wifi list it report...WEP!
nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
E**************** Mysid Infra 6 65 Mbit/s 97 ▂▄▆█ WEP
Why?
How to disable wep?
edit1: i add this
auth_algs=1
but don't work, is still wep
elbarna
(13690 rep)
Jul 7, 2022, 11:48 PM
• Last activity: Sep 12, 2023, 10:51 PM
1
votes
1
answers
5766
views
Can't connect to WPA2/PEAP/MSCHAPv2 enterprise wifi network without a certificate. Fedora 34
My university wifi uses WPA2 Enterprise for students to connect with their logins and passwords and I cannot do it, network manager always says the password is incorrect and prompts me for another one even though the password is correct. My problem is simmiliar to https://askubuntu.com/questions/279...
My university wifi uses WPA2 Enterprise for students to connect with their logins and passwords and I cannot do it, network manager always says the password is incorrect and prompts me for another one even though the password is correct.
My problem is simmiliar to https://askubuntu.com/questions/279762/how-to-connect-to-wpa2-peap-mschapv2-enterprise-wifi-networks-that-dont-use-a-c but none of the solutions work for me. I use Fedora 34 Gnome, my wifi adapter model is Intel AX200
My
/etc/NetworkManager/system-connections/UNIVERSITY.WIFI
look like this
[connection]
id=UNIVERSITY.WIFI
uuid=0cdeb50f-03dd-45ba-85df-465027f0e12a
type=wifi
interface-name=wlp1s0
permissions=
[wifi]
hidden=true
mac-address-blacklist=
mode=infrastructure
ssid=UNIVERSITY.WFIFI
[wifi-security]
key-mgmt=wpa-eap
[802-1x]
eap=peap;
identity=my_login
password=my_password
phase2-auth=mschapv2
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]
crispr
(11 rep)
Oct 23, 2021, 09:38 AM
• Last activity: Jun 27, 2022, 07:46 AM
0
votes
1
answers
233
views
Deactivate wpa_cli notifications
Is it possible to deactivate `wpa_cli` notifications/messages like ` WPS_AP_AVAILABLE`? Because it spams it, and in a VT where you have to slowly type MACs@ and bssIDs, it's really hard with those bothering messages
Is it possible to deactivate
wpa_cli
notifications/messages like WPS_AP_AVAILABLE
? Because it spams it, and in a VT where you have to slowly type MACs@ and bssIDs, it's really hard with those bothering messages
aaa
(177 rep)
Jul 16, 2021, 07:53 PM
• Last activity: Aug 24, 2021, 01:29 PM
0
votes
0
answers
112
views
Packet delay after route is added over new WiFi connection
## Network Setup ## - STA is Ubuntu 18.04 (4.15.0-147-generic) - 2x Intel 7620 - Each interface is connected to a different AP in the same subnet - STA is streaming 1080p video over UDP (~15Mbits/s) using gstreamer - Video is streamed exclusively over the WiFi one interface st a time, all other traf...
## Network Setup ##
- STA is Ubuntu 18.04 (4.15.0-147-generic)
- 2x Intel 7620
- Each interface is connected to a different AP in the same subnet
- STA is streaming 1080p video over UDP (~15Mbits/s) using gstreamer
- Video is streamed exclusively over the WiFi one interface st a time, all other traffic uses a wired connection
## Problem ##
I control which WiFi interface streams the video using a static route to the receive pipeline for each interface
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
_gateway 255.255.255.255 UGH 99 0 0 wlp1s0
_gateway 255.255.255.255 UGH 100 0 0 wlp2s0
In the above scenario, traffic is routed over wlp1s0
. When I remove the route for wlp1s0
, I see in iftop
that traffic is then sent over wlp2s0
.
I notice that there is a problem that manifests as one or two lost / delayed frames on the video receive pipeline if I reroute the video traffic over a connection that has not been used yet. Using the above scenario as an example, I start off with both interfaces authenticated, associated, and 4-way handshake complete, but the route for wlp1s0
has a lower metric than wlp2s0
, so no packets have been sent over wlp2s0
yet. When I remove the route for wlp1s0
, there is a very short blip in the video, then everything goes back to normal.
The strange thing is, after I experience this blip in the video and stay connected to the same APs, I can add and remove the route for wlp1s0
repeatedly with absolutely no noticeable effect on the video. I've verified using iftop
that I can flip flop which interface is active, and there isn't any effect on the video quality.
## Things I've looked at ##
I've run wpa_supplicant
manually at the highest verbosity, and there are no relevant errors / warnings. I've also taken a look at the AP controller log, and there are no errors / warnings reported there. Using sudo tcpdump -c 10000 -n -B 10240 -i wlp1s0
while I induced the blip in the video also didn't report any problems.
What else can I look at to diagnose and fix this issue?
## Update ##
I created a cgroup with a new routing table and a static route on wlp1s0
to the video pipeline destination. I observed that if I push traffic over wlp1s0
using
cgexec -g net_cls:cg1 iperf3 -c -p 1234 -u -b 10M
right before I add the route for wlp1s0
to the default table, there is no blip in the video. I guess what that means is that blips in the video is from a stale arp cache?
Jeff Isaacs
(469 rep)
Aug 10, 2021, 04:41 PM
• Last activity: Aug 11, 2021, 05:28 PM
2
votes
0
answers
5264
views
Static wifi configuration using /etc/network/interfaces.d and wpa_supplicant
__What I'm trying to achieve__ - Having two different local on the same network ips for Wifi and Ethernet, respectively on a GUI-less Debian Buster 10.10. Ethernet is working, but wpa_supplicant keeps crashing. I'm trying to follow the instructions on [Debian wiki](https://wiki.debian.org/WiFi/HowTo...
__What I'm trying to achieve__
- Having two different local on the same network ips for Wifi and Ethernet, respectively on a GUI-less Debian Buster 10.10.
Ethernet is working, but wpa_supplicant keeps crashing. I'm trying to follow the instructions on [Debian wiki](https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant) .
2: enp2s0: mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1d:72:c7:ad:43 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.30/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::21d:72ff:fec7:ad43/64 scope link
valid_lft forever preferred_lft forever
3: wlp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:1f:3b:4e:88:eb brd ff:ff:ff:ff:ff:ff
Content of /etc/network/interfaces.d/enp2s0
:
#custom configuration
allow-hotplug enp2s0
iface enp2s0 inet static
address 192.168.1.30/24
netmask 255.255.255.0
gateway 192.168.1.1
Content of etc/network/interfaces.d/wlps40
allow-hotplug wlp4s0
iface wlp4s0 inet static
wpa-ssid SSID_NAME_WITHOUT_QUOTES
wpa-psk PSK_HASH_OBTAINED_FROM_WPA_SUPPLICANT_WITHOUT_QUOTES
address 192.168.1.31
netmask 255.255.255.0
gateway 192.168.1.1
Content of /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
update_config=1
network={
ssid=SSID_NAME_INSIDE_DOUBLE_QUOTES
#psk="PSK_IN_PLAIN_TEXT"
psk=PSK_HASH
}
Then created the [tag:wpa-supplicant] service and restarted it as instructed by the wiki page.
Then the command :
$ sudo wpa_supplicant -B -Dwext -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
I get this response :
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Journalctl is yelling: wrong key, but my gut is telling me that there are errors config-file wise on top of that.
Any help will be much appreciated.
# update #
Moved and renamed /etc/network/interfaces.d/enp2s0
Edited /etc/network/interfaces.d/wlp4s0
as follows
#wlp4s0 custom configuration
allow-hotplug wlp4s0
iface wlp4s0 inet static
address 192.168.1.31
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B -f /var/log/wpa_supplicant.log
Replaced the hash of the [tag:psk] with plain text.
Deleted /run/wpa_supplicant/wlp4s0
and restarted the [tag:wpa-supplicant] service.
Now I am able to connect to the internet using the wireless device.
I ran sudo ifdown wlp4sO
to bring the device down and see if I can bring it up, again.
if up wlp4s0
succeeds after deleting /run/wpa_supplicant/
dhiaagr
(21 rep)
Jul 11, 2021, 10:31 PM
• Last activity: Jul 12, 2021, 01:59 AM
0
votes
1
answers
468
views
Raspberry Pi AP hostapd not working with WPA
I'm trying to make an AP out of my Raspberry Pi and I have a strange problem. I have installed hostadp and dnsmasq When I set an open network everything works but when I try to add a passphrase, only one client connects (Huawei android phone). Other clients keep associating and dissociating and on t...
I'm trying to make an AP out of my Raspberry Pi and I have a strange problem.
I have installed hostadp and dnsmasq
When I set an open network everything works but when I try to add a passphrase, only one client connects (Huawei android phone). Other clients keep associating and dissociating and on the client side I get authentication error.
hostapd.conf looks like this:
ssid=Network
wpa=1
auth_algs=1
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK
wpa_passphrase=* some * passphrase *
I tried different values for wpa key and nothing works.
dnsmasq is working, and for one client that can connect everything works fine.
Any ideas?
Thanks in advance!
golder3
(1194 rep)
Apr 17, 2021, 01:45 PM
• Last activity: Apr 17, 2021, 02:31 PM
0
votes
0
answers
434
views
Connect to AP using push WPS
I tried accordingly to existing topics (in SE or other websites) to connect to an AP with button WPS. `wps_pbc` associate successfully, `dhclient` gives me an internal IP successfully, but `firefox` loads no pages at all So, where is the truth between all those commands? ```sh systemctl start/stop s...
I tried accordingly to existing topics (in SE or other websites) to connect to an AP with button WPS.
wps_pbc
associate successfully, dhclient
gives me an internal IP successfully, but firefox
loads no pages at all
So, where is the truth between all those commands?
systemctl start/stop systemd-resolved.service
wpa_cli wps_pbc
wpa_cli interface wlo1
systemctl start/stop NetworkManager.service
dhclient wlo1
ip addr flush dev wlo1
ifdown/up wlo1
ping 1.1.1.1
firefox google.com
aaa
(177 rep)
Apr 3, 2021, 05:22 PM
6
votes
1
answers
9861
views
Generate a QR-code to log into Wireless (wifi) with WPA encryption
I installed a command-line QR-code generator: apt install qrencode I used the following format, so the QR scanner knows what to do with the content: WIFI:T:WPA;S: ;P: ;; generating the QR image file then works like this: qrencode "WIFI:T:WPA;S:My_Network;P:My_very_secure_Password;;" -o wifi_login.pn...
I installed a command-line QR-code generator:
apt install qrencode
I used the following format, so the QR scanner knows what to do with the content:
WIFI:T:WPA;S:;P:;;
generating the QR image file then works like this:
qrencode "WIFI:T:WPA;S:My_Network;P:My_very_secure_Password;;" -o wifi_login.png
this generates an image file
wifi_login.png
with the QR encoded string.
while the option -o FILENAME
or --output=FILENAME
makes qrencode
write the generated image to this FILENAME
. -
can be used to print to standard output.
The whole procedure works pretty well with MAC devices, but not with Android.
**Is there anything wrong with the string, making it not Android-compatible?**
nath
(6094 rep)
Jan 12, 2021, 01:36 PM
• Last activity: Jan 14, 2021, 10:25 PM
0
votes
0
answers
2489
views
How to connect kali linux to a wifi using WPA2 Enterprise, using PEAP method?
I am using Kali Linux 2019.4, kernel version 5.3.0-kali2-amd64 and I have trouble connecting to my school wifi, which uses WPA2 Enterprise and uses PEAP (Protected Extensible Authentication Protocol). I tried to connect with correct credentials but it showed that Linux can't scan the access point an...
I am using Kali Linux 2019.4, kernel version 5.3.0-kali2-amd64 and I have trouble connecting to my school wifi, which uses WPA2 Enterprise and uses PEAP (Protected Extensible Authentication Protocol).
I tried to connect with correct credentials but it showed that Linux can't scan the access point and I cannot connect to the wifi. The IT department in my school told me to use Ubuntu instead but I do not want to do that unless it is the only way.
Anonymous_user
(1 rep)
Jan 6, 2020, 04:27 PM
• Last activity: Jan 6, 2020, 05:04 PM
1
votes
0
answers
1144
views
wpa_supplicant: try connecting to wifi without password
when using wpa_supplicant and trying to connect to a wifi having a proper password the common approach would look somehow like that ``` add_network set_network 0 ssid "myssid" set_network 0 psk "mypassword" enable_network 0 reassociate ``` where in case of failure I would receive those events ``` CT...
when using wpa_supplicant and trying to connect to a wifi having a proper password the common approach would look somehow like that
add_network
set_network 0 ssid "myssid"
set_network 0 psk "mypassword"
enable_network 0
reassociate
where in case of failure I would receive those events
CTRL-EVENT-DISCONNECTED
CTRL-EVENT-SSID-TEMP-DISABLED
whereas in case of success I would receive
CTRL-EVENT-CONNECTED
When now using no password, where the common approach, as I read would be
add_network
set_network 0 ssid "myssid"
set_network key_mgmt NONE
enable_network 0
reassociate
I don't receive any of the before mentioned events nor any other giving any hint about the status. I have not tested it when actually trying to connect to an unsecure password but what bothers me even more is that I don't get any WRONG_KEY information when trying to connect to a secured wifi. Is there any way to cope that?
plazmakeks
(191 rep)
May 21, 2019, 07:22 AM
3
votes
2
answers
7992
views
Skip scanning in wpa_supplicant
When we execute command `wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf` for connecting to AP, `wpa_supplicant` follows following steps: 1. wpa_supplicant requests the kernel driver to scan neighboring BSSes 2. wpa_supplicant selects a BSS based on its configuration 3. wpa_supplicant requests the...
When we execute command
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf
for connecting to AP, wpa_supplicant
follows following steps:
1. wpa_supplicant requests the kernel driver to scan neighboring BSSes
2. wpa_supplicant selects a BSS based on its configuration
3. wpa_supplicant requests the kernel driver to associate with the
chosen BSS
Is there any way to skip the scanning part i.e. step no.1 ?
Since scanning takes considerably few seconds, as local env have 50+ SSID.
SHW
(15376 rep)
Dec 20, 2018, 07:43 AM
• Last activity: Dec 20, 2018, 12:43 PM
1
votes
1
answers
2272
views
Can't connect to WiFi with WPA-EAP
I'm trying to connect to a WiFi with WPA-EAP, but it always fails with error: failure to add network: invalid message format Full log from journalctl: NetworkManager[668]: device (wlp5s0): Activation: starting connection 'eduroam' (1ed02f15-9f55-452c-9b1c-4b2670bb2eac) NetworkManager[668]: audit: op...
I'm trying to connect to a WiFi with WPA-EAP, but it always fails with error:
failure to add network: invalid message format
Full log from journalctl:
NetworkManager: device (wlp5s0): Activation: starting connection 'eduroam' (1ed02f15-9f55-452c-9b1c-4b2670bb2eac)
NetworkManager: audit: op="connection-activate" uuid="1ed02f15-9f55-452c-9b1c-4b2670bb2eac" name="eduroam" pid=3216 uid=1000 result="success"
NetworkManager: device (wlp5s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager: manager: NetworkManager state is now CONNECTING
NetworkManager: device (wlp5s0): set-hw-addr: reset MAC address to 80:86:F2:1D:79:41 (preserve)
NetworkManager: device (wlp5s0): state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager: device (wlp5s0): Activation: (wifi) access point 'eduroam' has security, but secrets are required.
NetworkManager: device (wlp5s0): state change: config -> need-auth (reason 'none') [50 60 0]
kernel: IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready
NetworkManager: device (wlp5s0): state change: need-auth -> prepare (reason 'none') [60 40 0]
NetworkManager: device (wlp5s0): state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager: device (wlp5s0): Activation: (wifi) connection 'eduroam' has security, and secrets exist. No new secrets needed.
NetworkManager: Config: added 'ssid' value 'eduroam'
NetworkManager: Config: added 'scan_ssid' value '1'
NetworkManager: Config: added 'key_mgmt' value 'WPA-EAP'
NetworkManager: Config: added 'proto' value 'RSN'
NetworkManager: Config: added 'pairwise' value 'CCMP'
NetworkManager: Config: added 'group' value 'CCMP TKIP'
NetworkManager: Config: added 'password' value ''
NetworkManager: Config: added 'eap' value 'PEAP'
NetworkManager: Config: added 'fragment_size' value '1266'
NetworkManager: Config: added 'phase2' value 'auth=MSCHAPV2'
NetworkManager: Config: added 'ca_cert' value '/ca.pem'
NetworkManager: Config: added 'altsubject_match' value 'DNS:'
NetworkManager: Config: added 'identity' value ''
NetworkManager: Config: added 'anonymous_identity' value ''
NetworkManager: Config: added 'bgscan' value 'simple:30:-65:300'
NetworkManager: Config: added 'proactive_key_caching' value '1'
NetworkManager: sup-iface[0x5609a63bf980,wlp5s0]: assoc[0x5609a63c8f40]: failure to add network: invalid message format
NetworkManager: device (wlp5s0): state change: config -> failed (reason 'supplicant-failed') [50 120 10]
NetworkManager: manager: NetworkManager state is now DISCONNECTED
NetworkManager: device (wlp5s0): Activation: failed for connection 'eduroam'
NetworkManager: device (wlp5s0): state change: failed -> disconnected (reason 'none') [120 30 0]
kernel: IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready
NetworkManager: device (wlp5s0): set-hw-addr: set MAC address to 16:09:73:46:D9:3E (scanning)
kernel: IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready
What I am doing wrong?
Martin Heralecký
(850 rep)
Oct 12, 2018, 02:29 PM
• Last activity: Nov 27, 2018, 10:19 PM
4
votes
1
answers
5126
views
wpa_supplicant says network is disabled
When trying to connect to a network (specifically a WPA2 enterprise network for a university) with `wpa_supplicant` on Gentoo Linux, the network is shown as disabled when the flag is not set. My `wpa_supplicant.conf` : ctrl_interface=/var/run/wpa_supplicant network={ ssid="TheNetwork" eap=PEAP ident...
When trying to connect to a network (specifically a WPA2 enterprise network for a university) with
wpa_supplicant
on Gentoo Linux, the network is shown as disabled when the flag is not set.
My wpa_supplicant.conf
:
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="TheNetwork"
eap=PEAP
identity="redacted"
password="redacted"
ca_cert="/etc/ssl/certs/AddTrust_External_Root.pem"
ca_path="/etc/ssl/certs/"
phase1="peapver=0"
phase2="auth=MSCHAPV2"
}
network={
ssid="Another network that works"
key_mgmt=NONE
disabled=1 # This is obviously not normally disabled
}
network={
ssid="Yet another working network"
psk="redacted"
disabled=1 # Likewise
}
Output of sudo wpa_supplicant -iwlp3s0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d
, with repetitive lines removed:
wpa_supplicant v2.6
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlp3s0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Priority group 0
id=0 ssid='TheNetwork'
id=1 ssid='Another network that works'
id=2 ssid='Yet another working network'
nl80211: Supported cipher 00-0f-ac:1
...
nl80211: Supported cipher 00-0f-ac:9
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: interface wlp3s0 in phy phy0
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x55701974e5f0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55701974e5f0 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55701974e5f0 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55701974e5f0 match=040b
...
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlp3s0 to a new radio phy0
nl80211: Regulatory information - country=US (DFS-FCC)
nl80211: 2402-2472 @ 40 MHz 30 mBm
nl80211: 5170-5250 @ 80 MHz 23 mBm
nl80211: 5250-5330 @ 80 MHz 23 mBm (DFS)
nl80211: 5490-5730 @ 160 MHz 23 mBm (DFS)
nl80211: 5735-5835 @ 80 MHz 30 mBm
nl80211: 57240-63720 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlp3s0: Own MAC address: [redacted]
wpa_driver_nl80211_set_key: ifindex=4 (wlp3s0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
...
wpa_driver_nl80211_set_key: ifindex=4 (wlp3s0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlp3s0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlp3s0: No enabled networks (3 disabled networks)
wlp3s0: State: DISCONNECTED -> INACTIVE
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/wlp3s0'
wlp3s0: Added interface wlp3s0
wlp3s0: State: INACTIVE -> DISCONNECTED
nl80211: Set wlp3s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
random: Got 20/20 bytes from /dev/random
EAPOL: disable timer tick
What sticks out to me is the line wlp3s0: No enabled networks (3 disabled networks)
. This appears despite the fact that there are clearly only two disabled networks. Further evidence that the first network is being disabled despite the lack of a disabled=1
flag is that when running the wpa_supplement command with the other two networks *enabled*, a scan is performed and output, but all relevant APs are skipped as "disabled", "SSID mismatch", and "SSID mismatch", even though the SSIDs clearly do match. When running wpa_supplicant with the other two networks removed, the line wlp3s0: No enabled networks (1 disabled networks)
appears.
What in the configuration is causing this to occur?
igneous_flock
(143 rep)
Aug 21, 2018, 12:05 AM
• Last activity: Aug 22, 2018, 09:10 PM
1
votes
2
answers
7245
views
How to enable WPA/WPA2 in NetworkManager?
I just reinstalled ArchLinux on my Thinkpad. I am a bit puzzled that the `network-manager-applet` only supports WEP encryption for wifi networks. [![network-manager-applet][1]][1] I already installed `wpa_supplicant` and `wireless_tools` as [suggested elsewhere on the internet][2]. 0 ✓ user@alcor ~...
I just reinstalled ArchLinux on my Thinkpad. I am a bit puzzled that the
I already installed
network-manager-applet
only supports WEP encryption for wifi networks.

wpa_supplicant
and wireless_tools
as suggested elsewhere on the internet .
0 ✓ user@alcor ~ $ pacaur -Qs network
local/libnm-glib 1.4.4-1
NetworkManager library
local/network-manager-applet 1.4.2-1
Applet for managing network connections
local/networkmanager 1.4.4-1
Network connection manager and user applications
local/nm-connection-editor 1.4.2-1
NetworkManager GUI connection editor and widgets
I'm running ArchLinux with kernel 4.8.13-1-ARCH and the classic Mate Desktop environment in GTK-2 version.
How to enable WPA and WPA2 for the Network Manager Applet?
q9f
(2418 rep)
Dec 19, 2016, 04:00 PM
• Last activity: Aug 17, 2018, 09:28 PM
1
votes
1
answers
4761
views
Cannot connect to wifi with wpa_supplicant
I just installed Arch Linux on my laptop. So far I have only been able to connect to wired networks. When I try to connect to my wifi network with `wpa_supplicant -D nl80211,wext -i wlp3s0 -C Note: Because of the process substitution, you cannot run this command with sudo - you will need a root shel...
I just installed Arch Linux on my laptop. So far I have only been able to connect to wired networks. When I try to connect to my wifi network with `wpa_supplicant -D nl80211,wext -i wlp3s0 -C Note: Because of the process substitution, you cannot run this command with sudo - you will need a root shell. Just pre-pending sudo will lead to the following error:
Successfully initialized wpa_supplicant
Failed to open config file '/dev/fd/63', error: No such file or directory
Failed to read or parse configuration '/dev/fd/63'
WPA supplicant - Connecting with wpa_passphrase | wiki.archlinux.org
That says I need to be in a root shell rather than running with the
sudo
prefix. The thing is, that's what I have been doing. I have tried this by logging into my computer as root and as logging in with my user and switching to root with su - root
, but I always get this error.
Marcel
(550 rep)
Mar 24, 2016, 02:10 PM
• Last activity: Apr 14, 2018, 12:30 PM
Showing page 1 of 20 total questions