Do the regular routine of unplugging the power-cord and holding the mode button and then plugging back until you land in recover mode (switch:)
Now enter the following commands
switch: SWITCH_IGNORE_STARTUP_CFG=1
switch: SWITCH_DISABLE_PASSWORD_RECOVERY=0
switch: boot
After reboot
Switch(config)#no system ignore startupconfig switch all
Switch(config)#system disable password recovery switch all
Switch#copy running startup