Reset password

1: Restart cisco router Press key ctrl+pause break,
2:rommon 1 > confreg 0x2142
3:rommon 2 > reset
4:Restart Cisco Router again
5:Router>enRouter#show startup-config
  Router#conf t
  Router(config)#no enable password
  Router(config)#no enable secret
  Router(config)#config-register 0x2102
  Router(config)#end
  Router#reload

Recovery password

Router#copy startup-config running-config