Do not be surprised, if you can’t change the default pi account password just by typing sudo passwd – it let you change the password, but it does not take any effect! So how actually you can change the default pi password? You need to type sudo raspi-config, then you will get the window as shown below: