View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009300 | Kali Linux | Kali Package Improvement | public | 2025-09-15 18:06 | 2025-09-15 18:08 |
| Reporter | llamagobeepboop | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Summary | 0009300: Incorrect parsing of wpa_supplicant.conf for nmcli | ||||
| Description | I found this out the hard way when I attempted to use a wpa_supplicant.conf generated by the Raspberry Pi Imager tool to pre-configure wireless settings on a Raspberry Pi Zero 2 W. copy-user-wpasupplicant.sh doesn't correctly parse wpa_supplicant.conf to extract the SSID and PSK for nmcli. As a workaround, I would suggest leveraging the fact that certain fields must be quoted (SSID, ASCII PSK) or unquoted (hex PSK) and limiting it to a single match: SSID values must be quotedssid=$(grep -m 1 'ssid="' /boot/firmware/wpa_supplicant.conf | cut -d '=' -f2- | tr -d '"') ASCII PSK must be quoted, length 8 to 63psk=$(grep -m 1 'psk="' /boot/firmware/wpa_supplicant.conf | cut -d '=' -f2- | tr -d '"') orpsk=$(grep -m 1 -E 'psk="[^"]{8,63}"' /boot/firmware/wpa_supplicant.conf | cut -d '=' -f2- | tr -d '"') Hex PSK must be unquoted, length 64psk=$(grep -m 1 'psk=[^"]' /boot/firmware/wpa_supplicant.conf | cut -d '=' -f2- | tr -d '"') orpsk=$(grep -m 1 -E 'psk=[A-Fa-f0-9]{64}' /boot/firmware/wpa_supplicant.conf | cut -d '=' -f2- | tr -d '"') | ||||
|
Apologies for the janky description formatting! I didn't realize the bug tracker supported markdown and it doesn't look like I can edit the description. :( |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-09-15 18:06 | llamagobeepboop | New Issue | |
| 2025-09-15 18:08 | llamagobeepboop | Note Added: 0020821 |