Where does Macbook Pro store wifi information?
Your Mac also stores the information about Wi-Fi access points it connected to in NVRAM.
From the Apple Support article:
- https://support.apple.com/kb/HT204063
NVRAM (nonvolatile random-access memory) is a small amount of memory that your Mac uses to store certain settings and access them quickly.
While iCloud keychain also stores the Wi-Fi access point information, it's tied to a users Apple ID.
So if you are looking for a scenario where you want to give away your Mac to someone else, and do not want the Mac to retain crucial information such as your Wi-Fi access point password, you could, in addition to wiping the hard drive/reinstalling the operating system also take additional steps to reset NVRAM and PRAM on your Mac.
The linked article describes the steps to reset NVRAM and PRAM.
How to reset NVRAM
Option + Command + P + R
Shut down your Mac, then turn it on and immediately press and hold these four keys together: Option, Command, P, and R. You can release the keys after about 20 seconds, during which your Mac might appear to restart.
If you use iCloud Keychain then via this link it states:
If you use iCloud, you can have iCloud Keychain securely store the website login information and credit card information you use with AutoFill in Safari, and your Wi-Fi network information. iCloud Keychain automatically keeps that information up to date across all your Mac computers and iOS and iPadOS devices. iCloud Keychain also stores login information for the accounts you use in Mail, Contacts, Calendar, and Messages so it’s available on all your devices.
If you do not use iCloud however, then it is still stored in keychain, just locally on the device.