Course contents

Chapter 12: Security FundamentalsLesson 10 of 19

Password policy and Cisco password types

Length, uniqueness, expiry and lockout, and how IOS stores passwords: types 0, 5, 7, 8 and 9.

Beginner · 8 min read

Technical definition

Password policy is the set of rules an organisation sets for how passwords are chosen, stored, changed and protected. Good policy balances security against how people actually use passwords.

What a policy sets

Diagram
Common password policy elements
Common password policy elements
ElementTypical ruleWhy
LengthAt least 12 to 14 characters; allow long passphrasesLength defeats guessing more than special characters
ComplexityAllow all characters; reject common and breached passwordsBlocks Password123 even when it meets old rules
UniquenessA different password for every systemOne breach must not open other systems
ExpiryChange on evidence of compromise, not on a calendarForced rotation produces weaker passwords
Lockout and rate limitingLock or delay after repeated failuresSlows brute-force and guessing
StorageStore only salted hashes with a slow algorithmA stolen database should not reveal passwords
DefaultsChange every default password at installDefault credentials are public knowledge
AlternativesMFA, certificates, biometrics, password managersRemove or reduce the password as the only factor
These follow common guidance such as NIST SP 800-63B. Organisations adapt them, so read your own policy.

Why length and uniqueness win

An attacker with a stolen hash guesses offline, as fast as hardware allows. Every added character multiplies the work, so a 16-character passphrase is far stronger than an 8-character password with symbols. Reused passwords are the other large risk: a leak from one website becomes access to every account that shares the password. A password manager lets people use a long, unique password everywhere without memorising them.

Password types on Cisco IOS

Diagram
How IOS stores passwords
How IOS stores passwords
TypeMeaningStrength
0Plain text, as typedNone: anyone who reads the configuration sees it
5MD5 hash (enable secret on older software)Weak by today's standards
7Cisco's reversible scrambling (service password-encryption)Very weak: easily decoded, only hides it from a glance
8PBKDF2 with SHA-256Strong
9scryptStrong; the recommended choice where supported
Type numbers appear in show running-config before the stored value. Support for types 8 and 9 depends on the IOS version.

Configuring good habits on a device

Example commands and output on this page were written from Cisco IOS documentation and generally described behaviour. They were not captured from a live device, so prompts and details can differ on your platform and version.

security passwords min-length 12 enable algorithm-type scrypt secret ExamplePassphrase-2026 username admin algorithm-type scrypt secret AnotherExamplePassphrase login block-for 120 attempts 3 within 60 line vty 0 4 exec-timeout 5 0 login local transport input ssh

Minimum length, a strong stored password, a login delay after repeated failures, an idle timeout and SSH only. The passwords shown are examples; never use them.

  • service password-encryption is worth turning on to stop casual reading of line passwords, but it is not security: type 7 is reversible.
  • Prefer secret over password everywhere the command offers a choice.
  • Better still, send logins to a central AAA server and add MFA.

Test yourself

Predict · scenario 1

Which IOS command stores the enable password as a hash rather than reversible text?

Predict · scenario 2

Which Cisco password type is only reversible scrambling and should not be trusted?

Predict · scenario 3

Which policy choice does current guidance (such as NIST 800-63B) recommend over forced 90-day changes?

FAQ

Should passwords expire every 90 days?
Current guidance, including NIST SP 800-63B, advises against forcing regular changes without a reason. Frequent forced changes lead people to pick predictable variations. Change a password when there is evidence it was exposed, and rely on length, uniqueness and MFA.
Is enable password safe to use?
No. It stores the password in plain text unless service password-encryption is on, and that option only applies a weak reversible type 7. Use enable secret, which stores a hash.
Why is a long passphrase better than a short complex password?
Each extra character multiplies the number of guesses. A long phrase is easier to remember and harder to crack than a short string of symbols. Complexity rules alone encourage patterns such as Password1!.