The common question: “How to recover the password on Cisco Catalyst switches, such as Catalyst 2960, 3750-X, 3650 switches, Catalyst 3850 series and the new Catalyst 9000 switches?”
Here we’d like to share an example of recovering the password on Catalyst 9300 switches. This example has been posted in Cisco’s communities
It is the same as Catalyst 3850.
Power cycle the switch. Immediately press and hold the Mode button. Hold the button till the Status LED will go amber. Then on the console you should be in Boot Loader.
Add the following variables.
Then boot the switch.
Once the switch has booted you can copy the saved config back into the running config.
Switch# copy start runn
Next set your password(s). Finally we want to remove the variables we set while in Boot Loader.
Switch# no system ignore startupconfig switch all
Save your new config.
Switch# copy runn start
Info from https://communities.cisco.com/thread/85760