Pre-hashed Passwords


Recommended Posts

I am using a running switch config as a template for a new switch that I'm setting up. If service password-encryption was run on the other switch can I use the hashed passwords in my new configuration file or do I need to use plain-text?

Link to comment
Share on other sites

Based on my Google research as long as I TFTP the configs to flash I should be able to leave them as is as long as I keep the "5" there.

 

Example:

username myusername privilege 15 secret 5 XXXXXXXXXXXXXXXXXXXXXXXX

Does anyone have any experience with this?

Link to comment
Share on other sites

Yes, you can use your hased version password in your new switch. If it is MD5 use 5 and if it is SHA256 use 4 depending on how you configured your passwored in your current switch that you are copying from.

xxx-sw-int01(config)#username walid priv 15 sec ?
  0     Specifies an UNENCRYPTED secret will follow
  4     Specifies a SHA256 ENCRYPTED secret will follow
  5     Specifies a MD5 ENCRYPTED secret will follow
  LINE  The UNENCRYPTED (cleartext) user secret

xxx-sw-int01(config)#user                       
xxx-sw-int01(config)#usern
xxx-sw-int01(config)#username walid priv 15 sec 4 ?
  WORD  The HIDDEN user secret string

xxx-sw-int01(config)#username walid priv 15 sec 5 ?
  WORD  The HIDDEN user secret string

xxx-sw-int01(config)#username walid priv 15 sec 5
Link to comment
Share on other sites

 

Yes, you can use your hased version password in your new switch. If it is MD5 use 5 and if it is SHA256 use 4 depending on how you configured your passwored in your current switch that you are copying from.

xxx-sw-int01(config)#username walid priv 15 sec ?
  0     Specifies an UNENCRYPTED secret will follow
  4     Specifies a SHA256 ENCRYPTED secret will follow
  5     Specifies a MD5 ENCRYPTED secret will follow
  LINE  The UNENCRYPTED (cleartext) user secret

xxx-sw-int01(config)#user                       
xxx-sw-int01(config)#usern
xxx-sw-int01(config)#username walid priv 15 sec 4 ?
  WORD  The HIDDEN user secret string

xxx-sw-int01(config)#username walid priv 15 sec 5 ?
  WORD  The HIDDEN user secret string

xxx-sw-int01(config)#username walid priv 15 sec 5

It's MD5. Thank you for the help!

Link to comment
Share on other sites

This topic is now closed to further replies.