0

With the newest raspbian running on a CM4, I am unable to find any SSID or passphrase in /etc/wpa_supplicant/wpa_supplicant.conf and thus am unable to change the wifi password by mounting the SD card on my computer. The WiFi is working though, without the SSID being present in wpa_supplicant.conf... I can also configure the wifi using wpa_cli, but that does not seem to make any changes to wpa_supplicant.conf.

The OS reports as "Debian 1:6.1.63-1+rpt1", Debian Bookworm.

Here is my question: Where is the WIFI password and SSID stored and how do I access that file with the SD card and a computer, withouth booting up the PI?

Daniel D.
  • 29
  • 2
  • Looks like a case of failing to read the documentation. – Milliways Dec 22 '23 at 00:00
  • Added some information. What documentation did I miss to read? – Daniel D. Dec 22 '23 at 02:43
  • Is that sufficient? – Daniel D. Dec 22 '23 at 04:11
  • Just re-read your question & realized my answer missed the mark. You asked how to get to the wifi password without booting the pi. That's not the question that was answered - at least initially. As it turns out, you can no longer access your wifi password without booting up*... at least not easily, like in the good old days. Anyway, +1 and I've edited my answer FWIW. – Seamus Dec 22 '23 at 22:15
  • True, because I noticed that it didn't reflect my true question. – Daniel D. Dec 22 '23 at 23:47
  • @Milliways: The question is in the last sentence in the post. It never changed across 3 revisions. But don't take my word for it - check it yourself. – Seamus Dec 23 '23 at 00:53

2 Answers2

1

With the newest raspbian running on a ...

"newest raspbian" sounds like 'bookworm', and in 'bookworm' the application nmcli (or nmtui if you have a GUI bent) has "taken over the host/client networking function".

The blog titled "How to Connect to Wi-Fi Through the Linux Terminal With Nmcli" should get you going.

Beyond that, learning to use the "Official Documentation" may save you a few trips to SE (and the verbal abuse that goes along with not having done your homework :) For example, having a question related to "wifi password":

  1. go to RPi official documentation

  2. enter 'wifi password' in the box, and select one of the "suggestions". after doing so, you may eventually come to this section on Connect to a wireless network where you will find this:

Previous versions of Raspberry Pi OS made use of a wpa_supplicant.conf file which could be placed into the boot folder to configure wireless network settings. This is no longer possible from Raspberry Pi OS Bookworm onwards.

And so - you were a victim of your own experience! This is one of the things I dislike about all the suck-y new s**t :) lol

Seamus
  • 21,900
  • 3
  • 33
  • 70
1

It appears you have installed some version of Bookworm.

All new OS releases have details explaining the nature of the changes https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/

Bookworm (by default) uses Network Manager which does NOT use wpa_supplicant.conf although my Raspberry Pi OS Bookworm 64bit has the file /etc/wpa_supplicant/wpa_supplicant.conf it is empty

There is extensive documentation on Configuring Networking https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking

It is still not clear which particular version you installed and the best approach depends on this (normally only the 64bit identifies itself as Debian).
If you have installed Desktop use the networking icon on the panel.
If you have installed Raspberry Pi OS Lite there is a similar Curses menu which can be run at the command line with nmtui which presents a similar menu.

It is also possible to configure at command line with nmcli but this is more complex.

If you want to know about NetworkManager there are many posts documenting this in addition to the link above e.g. https://raspberrypi.stackexchange.com/a/139795/8697 which shows each WiFi network has a separate config file in /etc/NetworkManager/system-connections/ although in a well configured system these will have a 256bit WPA PSK rather than an ASCII passphrase. These files COULD be edited off line, but it is difficult to see WHY you would want to do this.

Milliways
  • 59,890
  • 31
  • 101
  • 209