Hello Afef,
you may connect via serial cable and reboot the switch. After seeing Cisco logo hit once Esc button and you will be redirected to boot menu.
One of the options (I believe option 3) is Password recovery. When choosing this option, and allowing to finish boot your password entry will be ignored and you will be able to change password and save.
I hope it is clear. Please let me know if you ave some doubts.
Aleksandra