Simply learn yourself.
For wifi

How to recover forgotten Wi-Fi password


Forgetting password can create trouble in case you trying to connect MacBook to wireless network. Just go through this instruction page in order to recover forgotten Wi-Fi password on MacBook.  While connecting to a network you need to enter the password for authentication. Here are some easy steps that you need to follow to recover password:       

Step 1:  Turn on your MacBook and login into the home screen.  Navigate to ‘Spotlight’ option and search for ‘Keychain’. Hit ‘Enter’ and you will get a keychain window.

Step 2: In keychain window, you will find a search bar at the right top corner. Type ‘AIRPORT’ in the search bar. Double click on connected network to see details.

Step 3: Click on show password option. You will be asked to 

enter system password.  Simply enter it and Wi-Fi password will be displayed. You can also change the password and keep it simple so that you can remember it easily.