If you have lost the password for an HP Procurve switch, you can reset the password as long as you have physical access to the device. Each switch has a "clear" or "reset/clear" button, depending on the model, that resets the device to its factory settings. Keep in mind that this process will clear all of the switch settings, not just the password alone. As such, this should only be done by a trained network technician familiar with HP switches.
Restoring Factory Settings
Locate the reset/clear button on the Procurve switch, while the switch is still plugged in and running. The button is beneath a hole about the size of a paperclip, which is labelled. The exact location varies depending on the model, but is normally found on the front or the back of the device. Your device may have both a "reset" and a "clear" button, in this case choose the "clear" button.
Straighten a paperclip. Ground it by touching it on something metal that is touching the floor. Insert the end of the paperclip into the clear button hole. You will feel the button inside the hole depress slightly. Press and hold the reset/clear button for 5 to 10 seconds in order to clear any passwords stored on the device.
Remove the paperclip. Once the device completes its diagnostics, it will resume normal operations under the original factory settings for devices where the "reset" button was used. Those devices where the "clear" button was available will now allow access to the control console where users can choose a new password.