Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

A password policy that works

After this lesson: I can write a password policy that follows current guidance.

60 min lesson6 commandsPassword lab: John the Ripper, MFA and passkeys

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

Why staff write passwords on sticky notes

A college asks for an uppercase letter, a digit and a symbol, and a new password every 60 days. Staff answer with Summer2026, then Autumn2026, written on a note under the keyboard.

The rules made passwords harder to remember and no harder to guess. Current guidance turns most of them round.

By the end of this lesson

Note

I can write a password policy that follows current guidance.

Key words

WordWhat it meansExample
Policythe rules a site sets for passwords
Composition rulea demand for kinds of characterone digit and one symbol
Blocklistpasswords refused because they are common or leaked
Rotationforcing a new password on a timetable
Password manageran app that makes and remembers passwords
k-anonymityasking about a group so no single item is revealed

The cells students fill in are left blank in this preview.

Starter

Have a go

Starter

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Current guidance favours length

NIST SP 800-63B and the NCSC agree on the core. Ask for length: at least 15 characters for a password used alone, or 8 when it is one factor of MFA. Allow at least 64.

Set no composition rules. Do not force rotation on a timetable; force a change only when there is evidence of compromise. The NCSC suggests three random words as a memorable start.

Worked example: old rules and current ones

Old ruleCurrent guidanceWhy
8 characters with a symbol15 or more, any charactersLength beats the mix
Change every 60 daysChange on evidence of compromiseRotation breeds patterns
A hint or a security questionNeitherBoth are easy to guess
Paste blockedPaste and managers allowedManagers make long passwords
Any password that fitsRefuse breached and common onesAttackers try them first

The cells students fill in are left blank in this preview.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

The lab site follows this policy

The lab's sign-in site has a check written to this guidance. It refuses a password under 15 characters, or under 8 when the account has MFA. It refuses passwords on its breached list and passwords holding the site's name or yours.

It never asks for a symbol. Send it some passwords and read the reasons it gives.

Check a common password

Command
curl -s -d '{"password": "sunshine"}' http://site:8000/check

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Check a complex short password

Command
curl -s -d '{"password": "Tr0ub4dor&3x"}' http://site:8000/check

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Check four random words

Command
curl -s -d '{"password": "plum kettle orbit lantern"}' http://site:8000/check

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Check a breached password with MFA

Command
curl -s -d '{"password": "password1", "mfa": true}' http://site:8000/check

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

A common mistake

Warning

Many people think Tr0ub4dor&3x is strong because it mixes every kind of character. It is short and built from a word, so cracking rules reach it. Four random words are longer and easier to remember. Judge a password by length and randomness, not by the mix.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Try it: a policy check

Code: python
# A policy that follows current guidance.
blocklist = ["password1", "sunshine", "liverpool1"]
password = "Liverpool1"
reasons = []
if len(password) < 15:
    reasons.append("too short")
if password.lower() in blocklist:
    reasons.append("on the blocklist")
print(reasons)
# Change the password to "plum kettle orbit lantern", then press Run.

Make a free account to save your work and track your progress.

Check a breached list without sending the password

A blocklist should hold passwords seen in real breaches. Pwned Passwords lists hundreds of millions, so sites ask it the private way: hash the password with SHA-1 and send only the first five characters.

The service returns every leaked hash with that start, and the match is made on your side. The lab site does the same with its own small list, padding each answer to 400 lines so its size gives nothing away.

Ask about a common password

Command
docker exec john python3 steps/pwned.py sunshine

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Ask about four random words

Command
docker exec john python3 steps/pwned.py "plum kettle orbit lantern"

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Assignment: a policy check

Write a password check that follows current guidance. check(password, blocklist, name, mfa) returns a list of reasons, in this order, and an empty list when the password is accepted: "too short" when it is under 15 characters, or under 8 when mfa is True; "too long" when it is over 128 characters; "on the blocklist" when the password in lower case is in blocklist; "contains your name" when name is not empty and appears in the password, ignoring case. Set no rule about kinds of character. accepted(password, blocklist, name, mfa) returns True when check gives no reasons.

Code: python
def check(password, blocklist, name, mfa):
    return []


def accepted(password, blocklist, name, mfa):
    return True

Make a free account to save your work and track your progress.

Exit quiz

Have a go

Exit quiz

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.