How to reset the password of a Fortinet FortiGate firewall ?
1- Connect to the firewall via the Console port on the back of the unit. This is done either by an Seriel cable or a RJ-45 to Seriel cabel. 
2- Start HyperTrm.exe (Hyber Terminal)
3- Connect to the firewall using the following parameter 1. Baud 9600
2. 8Bit
3. None
4. 1
5. None
6. And of course the correct com-port. Yeah I know, obvious... but many make this mistake
4- The firewall should then repose with its name or hostname. (If it dont try pressing "enter")
5- Type in the username: maintainer
6- password is the combination of the word bcpb + serial number of the firewall (remember all serial number charachters in capital letters).
Example: bcpbFGT60B3901150415 (NO, it’s not the real S/N)
1. Note that on some devices, after the device boots, you have 14 seconds to type in the username and password. It might, therefore, be necessary to have them ready in a text editor, and then copy and paste them into the login screen.
7- Now you should be connected to the firewall, and to change the admin password you type the following.
1. config system admin
2. edit admin
3. set password <psswrd>
4. end