200-301 · Security Fundamentals · Updated August 3, 2026
Securing Cisco Device Access: enable secret, line vty, and Privilege Levels
When both enable secret and enable password appear in a running configuration, IOS enforces the secret and ignores the older command entirely. That precedence is fixed in the software and does not depend on which line appears first. Around that single rule sits the rest of device access control: console and vty lines that only check a credential when login is present, an idle timeout that can be switched off by accident, and privilege levels that put a session at level 1 before enable and level 15 after it.
The two enable commands
enable password C1sco!2026 stores its value in clear text. enable secret C1sco!2026 runs the value through a one-way hashing algorithm and stores the result, so reading the configuration does not give anyone the original string. Both guard the same thing, the transition from user EXEC to privileged EXEC, and configuring both does not create two valid ways in.
enable password | enable secret | |
|---|---|---|
| Storage | clear text (type 0), or reversible type 7 once service password-encryption runs | one-way hash (type 5, 8, or 9) |
| Recoverable from a config file | yes | no |
| Precedence when both exist | ignored | enforced |
| Current status | retained for backward compatibility | the command to use |
The practical failure this creates is a stale enable password line that an engineer reads, copies, and hands to a colleague, who then cannot get into privileged EXEC. Remove the leftover with no enable password so the configuration says what it means. For the difference between the type numbers in that table, see Cisco IOS password types.
The same distinction applies to local accounts. username netadmin secret Str0ng!Pass stores a hash; username netadmin password Str0ng!Pass stores clear text. Neither keyword sets a privilege level, and neither is tied to a particular transport, so the choice is only about how the value is stored. Privilege is a separate argument: username netadmin privilege 15 secret Str0ng!Pass.
Console and vty lines
Two commands work together on every line, and confusing their roles produces the single most dangerous accident in device hardening.
R1(config)# line console 0
R1(config-line)# password Con5ole!
R1(config-line)# login
R1(config-line)# exec-timeout 5 0
password stores a value. login is what tells the line to check a value before admitting the session. A line configured with password and no login admits the session straight to the user EXEC prompt without asking for anything, and the configuration still looks protected during a review because the password line is sitting right there. The mirror-image error is login with no password value on a vty line, which makes the router refuse the connection with a message that a password is required but none is set.
login local changes the source of truth from the line password to the local username database, so the session is asked for a username and a password:
R1(config)# username netadmin secret Str0ng!Pass
R1(config)# line vty 0 15
R1(config-line)# login local
R1(config-line)# transport input ssh
transport input controls which protocols the line will accept. transport input ssh is the hardened setting. transport input telnet allows clear-text sessions, transport input all allows both, and transport input none accepts no inbound sessions on that line at all. SSH additionally requires a hostname, a domain name, and a generated RSA key pair before it will run.
Idle timeout
exec-timeout takes minutes then seconds. The default on IOS lines is 10 minutes, which applies when the command has never been entered or has been removed with its no form.
exec-timeout 0 0 does not mean zero time. Zero in both arguments is the documented way to disable the idle timeout, so the session stays open indefinitely with no automatic disconnect. That is convenient during a long capture or a slow software upload and a real exposure afterwards, because a privileged session left on an unattended terminal belongs to whoever walks up next. exec-timeout 5 0 gives a five-minute idle window and is a reasonable production value. There is no separate timeout for configuration mode versus show commands; one setting governs the line.
Privilege levels
IOS defines sixteen privilege levels numbered 0 through 15.
- Level 0 holds a handful of commands such as
disable,enable,exit,help, andlogout. It exists, but no ordinary session lands there. - Level 1 is user EXEC, where an authenticated session starts by default. The prompt ends in a greater-than sign,
R1>, and the available command set is limited to basic status commands. - Level 15 is privileged EXEC, the top of the range, reached by typing
enableand supplying the enable secret. The prompt ends in a hash,R1#, and everything including configuration mode is available.
Levels 2 through 14 are usable but empty until an administrator populates them:
R1(config)# privilege exec level 5 show running-config
R1(config)# enable secret level 5 L3vel5!Pass
R1(config)# username helpdesk privilege 5 secret H3lpd3sk!
That grants a help desk account the ability to read the configuration without granting configuration rights. The prompt-and-level pairing is exam-friendly and worth internalising along with the rest of the IOS CLI modes.
Physical access and the limits of passwords
A router with a strong enable secret and SSH-only vty lines is still fully exposed if someone can reach its console port. The password recovery procedure is a documented maintenance feature: interrupt the boot sequence into ROM monitor, set the configuration register to 0x2142 so the startup configuration is not loaded, boot into a blank running configuration, and you are at privileged EXEC without knowing any password. The startup configuration can then be copied in and its passwords rewritten. The register value that enables this, 0x2142, is also the one to keep well away from an IOS image upgrade, where 0x2102 is the setting a device should reload with.
That is why device hardening plans specify locked racks and closets alongside credentials, and why a branch router sitting on an open stockroom shelf is a finding regardless of how its passwords are configured. no service password-recovery blocks the procedure, at the cost that a genuinely forgotten password now requires erasing the configuration.
Login banner
A banner is a legal control, not a technical one. banner motd #Authorized access only. Activity is monitored.# displays text before the login prompt, and its purpose is to state that the system is restricted, that use is monitored, and that unauthorised access is prohibited. Wording that welcomes the reader or names the device, its owner, or its role undermines the notice and helps an intruder, which is why “Welcome” banners are treated as wrong answers.
How the 200-301 exam tests this
- A configuration excerpt shows both enable commands with different values and asks which one the router will demand. The answer is always the secret, and the position of the lines in the file is a deliberate distractor.
- A vty block appears with
passwordpresent andno loginconfigured, and you are asked what a Telnet user experiences. The session opens with no prompt at all, becauseloginis the command that activates checking. - An item asks what
exec-timeout 0 0accomplishes. Zero disables the timeout rather than setting it to instant disconnect, and the 10-minute default only applies when the command is absent. - A prompt-recognition item pairs
R1>andR1#with level numbers. User EXEC is level 1 and privileged EXEC is level 15, with level 0 real but nearly empty and level 16 nonexistent. - A physical-security scenario gives a hardened router in an unlocked space and asks why risk remains. Console access enables the ROMMON recovery procedure, which bypasses configured passwords entirely.
None of these items is hard once the override rule and the login behavior are second nature — a run of CCNA practice questions confirms they are.
Quick reference
enable secretalways overridesenable password; remove the older line to avoid confusion.username ... secretstores a hash,username ... passwordstores clear text; neither sets privilege.passwordstores a value,loginmakes the line check it.no loginwith a password configured means no authentication at all.login localuses the local username database and prompts for a username as well.transport input sshon vty lines;telnet,all, andnoneare the other options.exec-timeoutis minutes then seconds; default 10 minutes,0 0disables it.- Level 1 is user EXEC (
R1>), level 15 is privileged EXEC (R1#), level 0 exists with a handful of commands, and there is no level 16. - Console access permits ROMMON password recovery, so physical security is part of device hardening.