Lessons · Network switches · the enable secret
A password on the way in
enable secret sets the password that guards privileged mode, and it is stored hashed rather than in plain text.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
Without it, anybody who reaches the console owns the switch. With it, reaching the console gets you a read-only prompt and nothing else.
How to think about it
Set it early, write it down where your team can find it, and never use `enable password`, whose value sits in the configuration in the clear.
Worked example
enableNo password yet, so this just works. That is the problem.
configure terminalInto configuration mode.
enable secret Sw1tch-RoomFrom now on, enable asks.
endOut to Switch#.
show running-configThe line is there. On real hardware the value is stored as a hash, which is the whole reason to use secret rather than password.
disableBack down to Switch>, to see what somebody arriving at the console now meets.
Your turn
Protect privileged mode with the password Sw1tch-Room.
enable Sw1tch-Room
Console into a switch
The trap
Setting the password and not saving. A reboot brings back a switch with no password on it, and nothing tells you.
Practise the enable secret on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.