A solution to this problem involves pressing a button combination. Turn off the phone, then press * key + 3 key + Call button + Power button
until you see the Nokia Logo. You will be asked to enter a security code. If the default code hasn't been changed, enter 1234 or 12345
In case of success, the phone will reset and it will be restored to factory condition.
Additionally, you can visit a local phone service shop and they will remove the password with the help of a hardware box that can access system protected memory for a small fee.