Chapter 1. Configuring Security with Passwords Privileges and Logins

Finding Feature Information

Restrictions for Configuring Security with Passwords Privileges and Logins

Information About Configuring Security with Passwords Privileges and Logins

Benefits of Creating a Security Scheme

Cisco IOS XE CLI Modes

User EXEC Mode

Privileged EXEC Mode

Global Configuration Mode

Interface Configuration Mode

Subinterface Configuration Mode

Cisco IOS XE CLI Sessions

Local CLI Sessions

Remote CLI Sessions

Terminal Lines are Used for Local and Remote CLI Sessions

Protect Access to Cisco IOS XE EXEC Modes

Protecting Access to User EXEC Mode

Protecting Access to Privileged EXEC mode

Cisco IOS XE Password Encryption Levels

Cisco IOS XE CLI Session Usernames

Cisco IOS XE Privilege Levels

Cisco IOS XE Password Configuration

How To Configure Security with Passwords Privileges and Logins

Protecting Access to User Exec Mode

Configuring and Verifying a Password for Remote CLI Sessions

Troubleshooting Tips

What to Do Next

Configuring and Verifying a Password for Local CLI Sessions

Troubleshooting Tips

What to Do Next

Protecting Access to Privileged EXEC Mode

Configuring and Verifying the Enable Password

Troubleshooting Tips

What to Do Next

Configuring Password Encryption for Clear Text Passwords

Configuring and Verifying the Enable Secret Password

Troubleshooting Tips

What to Do Next

Configuring Security Options to Manage Access to CLI Sessions and Commands

Configuring the Networking Device for the First-Line Technical Support Staff

Verifying the Configuration for the First-Line Technical Support Staff

Troubleshooting Tips

What to Do Next

Configuring a Device to Require a Username for the First-Line Technical Support Staff

Recovering from a Lost or Misconfigured Password for Local Sessions

Networking Device Is Configured to Allow Remote CLI Sessions

Networking Device Is Not Configured to Allow Remote CLI Sessions

Recovering from a Lost or Misconfigured Password for Remote Sessions

Networking Device Is Configured to Allow Local CLI Sessions

Networking Device Is Not Configured to Allow Local CLI Sessions

Recovering from Lost or Misconfigured Passwords for Privileged EXEC Mode

A Misconfigured Privileged EXEC Mode Password Has Not Been Saved

Configuration Examples for Configuring Security with Passwords Privileges and Logins

Example: Configuring a Device to Allow Users to Clear Remote Sessions

Example: Configuring a Device to Allow Users to View the Running Configuration

Example: Configuring a Device to Allow Users to Shutdown and Enable Interfaces

Where to Go Next

Additional References

Feature Information for Configuring Security with Passwords Privileges and Logins

Chapter 2. Image Verification

Finding Feature Information

Restrictions for Image Verification

Information About Image Verification

Benefits of Image Verification

How Image Verification Works

How to Use Image Verification

Globally Verifying the Integrity of an Image

What to Do Next

Verifying the Integrity of an Image That Is About to Be Copied

Verifying the Integrity of an Image That Is About to Be Reloaded

Configuration Examples for Image Verification

Global Image Verification Example

Image Verification via the copy Command Example

Image Verification via the reload Command Example

Verify Command Sample Output Example

Additional References

Feature Information for Image Verification

Chapter 3. Role-Based CLI Access

Finding Feature Information

Prerequisites for Role-Based CLI Access

Restrictions for Role-Based CLI Access

Information About Role-Based CLI Access

Benefits of Using CLI Views

Root View

Lawful Intercept View

Superview

View Authentication via a New AAA Attribute

How to Use Role-Based CLI Access

Configuring a CLI View

Troubleshooting Tips

Configuring a Lawful Intercept View

Troubleshooting Tips

Configuring a Superview

Monitoring Views and View Users

Configuration Examples for Role-Based CLI Access

Example: Configuring a CLI View

Example: Verifying a CLI View

Example: Configuring a Lawful Intercept View

Example: Configuring a Superview

Additional References for Role-Based CLI Access

Feature Information for Role-Based CLI Access

Chapter 1. Configuring Security with Passwords Privileges and Logins

Cisco IOS based networking devices provide several features that can be used to implement basic security for CLI sessions using only the operating system running on the device. These features include the following:

- Different levels of authorization for CLI sessions to control access to commands that can modify the status of the networking device versus commands that are used to monitor the device

- Assigning passwords to CLI sessions

- Requiring users log in to a networking device with a username

- Changing the privilege levels of commands to create new authorization levels for CLI sessions.

This module is a guide to implementing a baseline level of security for your networking devices. It focuses on the least complex options available for implementing a baseline level of security. If you have networking devices installed in your network with no security options configured, or you are about to install a networking device and you need help understanding the how to implement a baseline of security, this document will help you.

- Finding Feature Information

- Restrictions for Configuring Security with Passwords Privileges and Logins

- Information About Configuring Security with Passwords Privileges and Logins

- How To Configure Security with Passwords Privileges and Logins

- Configuration Examples for Configuring Security with Passwords Privileges and Logins

- Where to Go Next

- Additional References

- Feature Information for Configuring Security with Passwords Privileges and Logins

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Restrictions for Configuring Security with Passwords Privileges and Logins

Your networking device must not be configured to use any local or remote authentication, authorization, and accounting (AAA) security features. This document describes only the non-AAA security features that can be configured locally on the networking device.

For information how to configure AAA security features that can be run locally on a networking device, or for information on how to configure remote AAA security using TACACS+ or RADIUS servers, see the Cisco IOS XE Security Configuration Guide: Securing User Services , Release 2.

Information About Configuring Security with Passwords Privileges and Logins

- Benefits of Creating a Security Scheme

- Cisco IOS XE CLI Modes

- Cisco IOS XE CLI Sessions

- Protect Access to Cisco IOS XE EXEC Modes

- Cisco IOS XE Password Encryption Levels

- Cisco IOS XE CLI Session Usernames

- Cisco IOS XE Privilege Levels

- Cisco IOS XE Password Configuration

Benefits of Creating a Security Scheme

The foundation of a good security scheme in the network is the protection of the user interfaces of the networking devices from unauthorized access. Protecting access to the user interfaces on your networking devices prevents unauthorized users from making configuration changes that can disrupt the stability of your network or compromise your network security.

The Cisco IOS XE features described in this document can be combined in many different ways to create a unique security scheme for each of your networking devices. Here are some possible examples that you can configure:

- You can enable non administrative users to run a subset of the administrative commands available on the networking device by lowering the entitlement level for the commands to the non administrative privilege level. This can be useful for the following scenarios:

- ISPs that want their first-line technical support staff to perform tasks such as enabling new interfaces for new customers or resetting the connection for a customer whose connection has stopped passing traffic. See the Example: Configuring a Device to Allow Users to Shutdown and Enable Interfaces section for an example of how to do this.

- When you want your first-line technical support staff to have the ability to clear console port sessions that were disconnected improperly from a terminal server. See the Example: Configuring a Device to Allow Users to Clear Remote Sessions section for an example of how to do this.

- When you want your first-line technical support staff to have the ability to view, but not change, the configuration of a networking device to facilitate troubleshooting a networking problem. See the Example: Configuring a Device to Allow Users to View the Running Configuration section for an example of how to do this.

Cisco IOS XE CLI Modes

To aid in the configuration of Cisco devices, the Cisco IOS XE command-line interface is divided into different command modes. Each command mode has its own set of commands available for the configuration, maintenance, and monitoring of router and network operations. The commands available to you at any given time depend on the mode you are in. Entering a question mark(?) at the system prompt (router prompt) allows you to obtain a list of commands available for each command mode.

The use of specific commands allows you to navigate from one command mode to another. The standard order in which a user would access the modes is as follows: user EXEC mode; privileged EXEC mode; global configuration mode; specific configuration modes; configuration submodes; and configuration subsubmodes.

Note

The default configuration of a Cisco IOS XE software based networking device only allows you to configure passwords to protect access to user EXEC mode (for local, and remote CLI sessions) and privileged EXEC mode. This document describes how you can provide additional levels of security by protecting access to other modes, and commands, using a combination of usernames, passwords and the privilege command.

Most EXEC mode commands are one-time commands, such as show or more commands, which show the current configuration status, and clear commands, which clear counters or interfaces. EXEC mode commands are not saved across reboots of the router.

From privileged EXEC mode, you can enter global configuration mode . In this mode, you can enter commands that configure general system characteristics. You also can use global configuration mode to enter specific configuration modes. Configuration modes, including global configuration mode, allow you to make changes to the running configuration. If you later save the configuration, these commands are stored across router reboots.

From global configuration mode you can enter a variety of protocol-specific or feature-specific configuration modes. The CLI hierarchy requires that you enter these specific configuration modes only through global configuration mode. For example, interface configuration mode , is a commonly used configuration mode.

From configuration modes, you can enter configuration submodes. Configuration submodes are used for the configuration of specific features within the scope of a given configuration mode. As an example, this chapter describes the subinterface configuration mode , a submode of the interface configuration mode.

ROM monitor mode is a separate mode used when the router cannot boot properly. If your system (router, switch, or access server) does not find a valid system image to load when it is booting, the system will enter ROM monitor mode. ROM monitor (ROMMON) mode can also be accessed by interrupting the boot sequence during startup. ROMMON is not covered in this document because it does not have any security features available in it.

- User EXEC Mode

- Privileged EXEC Mode

- Global Configuration Mode

- Interface Configuration Mode

- Subinterface Configuration Mode

User EXEC Mode

When you start a session on a router, you generally begin in user EXEC mode , which is one of two access levels of the EXEC mode. For security purposes, only a limited subset of EXEC commands are available in user EXEC mode. This level of access is reserved for tasks that do not change the configuration of the router, such as determining the router status.

If your device is configured to require users to log-in the log-in process will require a username and a password. You may try three times to enter a password before the connection attempt is refused.

User EXEC mode is set by default to privilege level 1. Privileged EXEC mode is set by default to privilege level 15. For more information see the Privileged EXEC Mode. When you are logged into a networking device in user EXEC mode your session is running at privilege level 1. By default the EXEC commands at privilege level 1 are a subset of those available at privilege level 15. When you are logged into a networking device in privileged EXEC mode your session is running at privilege level 15. You can move commands to any privilege level between 1 and 15 using the privilege command. See the Cisco IOS XE Privilege Levels for more information on privilege levels and the privilege command.

In general, the user EXEC commands allow you to connect to remote devices, change terminal line settings on a temporary basis, perform basic tests, and list system information.

To list the available user EXEC commands, use the following command:

Command

Purpose

Router(config)# ?

Lists the user EXEC mode commands

The user EXEC mode prompt consists of the host name of the device followed by an angle bracket (>), as shown in the following example:

Router>

The default host name is generally Router, unless it has been changed during initial configuration using the setup EXEC command. You also change the host name using the hostname global configurationcommand.

Note

Examples in Cisco IOS XE documentation assume the use of the default name of “Router.” Different devices (for example, access servers) may use a different default name. If the routing device (router, access server, or switch) has been named with the hostname command, that name will appear as the prompt instead of the default name.

To list the commands available in user EXEC mode, enter a question mark (?) as shown in the following example:

Router> ?

Exec commands:
<1-99>           Session number to resume
connect          Open a terminal connection
disconnect       Disconnect an existing telnet session
enable           Turn on privileged commands
exit             Exit from Exec mode
help             Description of the interactive help system
lat              Open a lat connection
lock             Lock the terminal
login            Log in as a particular user
logout           Exit from Exec mode and log out
menu             Start a menu-based user interface
mbranch          Trace multicast route for branch of tree
mrbranch         Trace reverse multicast route to branch of tree
mtrace           Trace multicast route to group
name-connection  Name an existing telnet connection
pad              Open a X.29 PAD connection
ping             Send echo messages
resume           Resume an active telnet connection
show             Show running system information
systat           Display information about terminal lines
telnet           Open a telnet connection
terminal         Set terminal line parameters
tn3270           Open a tn3270 connection
trace            Trace route to destination
where            List active telnet connections
x3               Set X.3 parameters on PAD

The list of commands will vary depending on the software feature set and router platform you are using.

Note

You can enter commands in uppercase, lowercase, or mixed case. Only passwords are case sensitive. However, Cisco IOS XE documentation convention is to always present commands in lowercase.

Privileged EXEC Mode

In order to have access to all commands, you must enter privileged EXEC mode , which is the second level of access for the EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. In privileged EXEC mode, you can enter any EXEC command, because privileged EXEC mode is a superset of the user EXEC mode commands.

Because many privileged EXEC mode commands set operating parameters, privileged EXEC level access should be password protected to prevent unauthorized use. The privileged EXEC command set includes those commands contained in user EXEC mode. Privileged EXEC mode also provides access to configuration modes through the configurecommand, and includes advanced testing commands, such as debug.

Privileged EXEC mode is set by default to privilege level 15. User EXEC mode is set by default to privilege level 1. For more information see the User EXEC Mode. When you are logged into a networking device in privileged EXEC mode your session is running at privilege level 15. When you are logged into a networking device in user EXEC mode your session is running at privilege level 1. By default the EXEC commands at privilege level 15 are a superset of those available at privilege level 1. You can move commands to any privilege level between 1 and 15 using the privilege command. See the Cisco IOS XE Privilege Levels for more information on privilege levels and the privilege command.

The privileged EXEC mode prompt consists of the host name of the device followed by a pound sign(#), as shown in the following example:

Router#

To access privileged EXEC mode, use the following command:

Command

Purpose

Router> enable

Password

Router# exit

Router>

Enables privileged EXEC mode.

- If a privileged EXEC mode password has been configured the system will prompt you for a password after you issue the enable command.

- Use the exit command to leave privileged EXEC mode.

Note

Privileged EXEC mode is sometimes referred to as “enable mode,” because the enable command is used to enter the mode.

If a password has been configured on the system, you will be prompted to enter it before being allowed access to privileged EXEC mode. The password is not displayed on the screen and is case sensitive. If an enable password has not been set, privileged EXEC mode can be accessed only by a local CLI session (terminal connected to the console port).

If you attempt to access privileged EXEC mode on a router over a remote connection, such as a telnet connection, and you have not configured a password for privileged EXEC mode you will see the % No password set error message. For more information on remote connections see the Remote CLI Sessions. The system administrator uses the enable secret or enable passwordglobal configuration commands to set the password that restricts access to privileged EXEC mode. For information on configuring a password for privileged EXEC mode, see the Protecting Access to Privileged EXEC Mode.

To return to user EXEC mode, use the following command:

Command

Purpose

Router# disable

Exits from privileged EXEC mode to user EXEC mode.

The following example shows the process of accessing privileged EXEC mode:

Router> enable
Password:<letmein>
Router#

Note that the password will not be displayed as you type, but is shown here for illustrational purposes.To list the commands available in privileged EXEC mode, issue the ? command at the prompt. From privileged EXEC mode you can access global configuration mode, which is described in the following section.

Note

Because the privileged EXEC command set contains all of the commands available in user EXEC mode, some commands can be entered in either mode. In Cisco IOS XE documentation, commands that can be entered in either user EXEC mode or privileged EXEC mode are referred to as EXEC mode commands. If user or privileged is not specified in the documentation, assume that you can enter the referenced commands in either mode.

Global Configuration Mode

The term “global” is used to indicate characteristics or features that affect the system as a whole. Global configuration mode is used to configure your system globally, or to enter specific configuration modes to configure specific elements such as interfaces or protocols. Use the configure terminalprivileged EXEC command to enter global configuration mode.

To access global configuration mode, use the following command in privileged EXEC mode:

Command

Purpose

Router#
configure terminal

From privileged EXEC mode, enters global configuration mode.

The following example shows the process of entering global configuration mode from privileged EXEC mode:

Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

Note that the system prompt changes to indicate that you are now in global configuration mode. The prompt for global configuration mode consists of the host-name of the device followed by (config) and the pound sign ( # ). To list the commands available in privileged EXEC mode, issue the ? command at the prompt.

Commands entered in global configuration mode update the running configuration file as soon as they are entered. In other words, changes to the configuration take effect each time you press the Enter or Return key at the end of a valid command. However, these changes are not saved into the startup configuration file until you issue the copy running-config startup-config EXEC mode command. This behavior is explained in more detail later in this document.

As shown in the example above, the system dialogue prompts you to end your configuration session (exit configuration mode) by pressing the Control (Ctrl) and “z” keys simultaneously; when you press these keys, ^Z is printed to the screen. You can actually end your configuration session by entering the Ctrl-Z key combination, using the end command, using the Ctrl-C key combination. The end command is the recommended way to indicate to the system that you are done with the current configuration session.

Caution

If you use Ctrl-Z at the end of a command line in which a valid command has been typed, that command will be added to the running configuration file. In other words, using Ctrl-Z is equivalent to hitting the Enter (Carriage Return) key before exiting. For this reason, it is safer to end your configuration session using the end command. Alternatively, you can use the Ctrl-C key combination to end your configuration session without sending a Carriage Return signal.

You can also use the exit command to return from global configuration mode to EXEC mode, but this only works in global configuration mode. Pressing Ctrl-Z or entering the end command will always take you back to EXEC mode regardless of which configuration mode or configuration submode you are in.

To exit global configuration command mode and return to privileged EXEC mode, use one of the following commands:

Command

Purpose

Router(config)# end

or

Router(config)# ^Z

Ends the current configuration session and returns to privileged EXEC mode.

Router(config)# exit

Exits the current command mode and returns to the preceding mode. For example, exits from global configuration mode to privileged EXEC mode.

From global configuration mode, you can enter a number of protocol-specific, platform-specific, and feature-specific configuration modes.

Interface configuration mode, described in the following section, is an example of a configuration mode you can enter from global configuration mode.

Interface Configuration Mode

One example of a specific configuration mode you enter from global configuration mode is interface configuration mode.

Many features are enabled on a per-interface basis. Interface configuration commands modify the operation of an interface such as an Ethernet, FDDI, or serial port. Interface configuration commands always follow an interface global configuration command, which defines the interface type.

For details on interface configuration commands that affect general interface parameters, such as bandwidth or clock rate, refer to the Release 12.2 Cisco IOS Interface Configuration Guide . For protocol-specific commands, refer to the appropriate Cisco IOS XE software command reference.

To access and list the interface configuration commands, use the following command:

Command

Purpose

Router(config)# interface type number

Specifies the interface to be configured, and enters interface configuration mode.

In the following example, the user enters interface configuration mode for serial interface 0. The new prompt, hostname (config-if)#, indicates interface configuration mode.

Router(config)# interface serial 0
Router(config-if)#

To exit interface configuration mode and return to global configuration mode, enter the exit command.

Configuration submodes are configuration modes entered from other configuration modes (besides global configuration mode). Configuration submodes are for the configuration of specific elements within the configuration mode. One example of a configuration submode is subinterface configuration mode, described in the following section.

Subinterface Configuration Mode

From interface configuration mode, you can enter subinterface configuration mode. Subinterface configuration mode is a submode of interface configuration mode. In subinterface configuration mode you can configure multiple virtual interfaces (called subinterfaces) on a single physical interface. Subinterfaces appear to be distinct physical interfaces to the various protocols.

For detailed information on how to configure subinterfaces, refer to the appropriate documentation module for a specific protocol in the Cisco IOS XE software documentation set.

To access subinterface configuration mode, use the following command in interface configuration mode:

Command

Purpose

Router(config-if)# interface type number

Specifies the virtual interface to be configured and enters subinterface configuration mode.

In the following example, a subinterface is configured for serial line 2, which is configured for Frame Relay encapsulation. The subinterface is identified as “2.1” to indicate that it is subinterface 1 of serial interface 2. The new prompt hostname (config-subif)# indicates subinterface configuration mode. The subinterface can be configured to support one or more Frame Relay PVCs.

Router(config)# interface serial 2
Router(config-if)# encapsulation frame-relay
Router(config-if)# interface serial 2.1
Router(config-subif)#

To exit subinterface configuration mode and return to interface configuration mode, use the exit command. To end your configuration session and return to privileged EXEC mode, press Ctrl-Z or enter the end command.

Cisco IOS XE CLI Sessions

- Local CLI Sessions

- Remote CLI Sessions

- Terminal Lines are Used for Local and Remote CLI Sessions

Local CLI Sessions

Local CLI sessions require direct access to the the console port of the networking device. Local CLI sessions start in user EXEC mode. See the Cisco IOS XE CLI Modes for more information on the different modes that are supported on your networking device. All of the tasks required to configure and manage a networking device can be done using a local CLI session. The most common method for establishing a local CLI session is to connect the serial port on a PC to the console port of the networking device and then to launch a terminal emulation application on the PC. The type of cable and connectors required and the settings for the terminal emulation application on the PC are dependant on the type of networking device that you are configuring. See to the documentation for your networking device for more information on setting it up for a local CLI session.

Remote CLI Sessions

Remote CLI sessions are created between a host such as a PC and a networking device such as a router over a network using a remote terminal access application such as Telnet and Secure Shell (SSH). Local CLI sessions start in user EXEC mode. See the Cisco IOS XE CLI Modes for more information on the different modes that are supported on your networking device. Most of the tasks required to configure and manage a networking device can be done using a remote CLI session. The exceptions are tasks that interact directly with the console port (such as recovering from a corrupted operating system (OS) by uploading a new OS image over the console port) and interacting with the networking device when it is in ROM Monitor Mode.

This document explains how to configure security for remote Telnet sessions. Telnet is the most common method for accessing a remote CLI session on a networking device.

Note

SSH is a more secure alternative to Telnet. SSH provides encryption for the session traffic between your local management device such as a PC and the networking device that you are managing. Encrypting the session traffic with SSH prevents hackers that might intercept the traffic from being able to decode it. See Secure Shell Version 2 Support feature module for more information on using SSH.

Terminal Lines are Used for Local and Remote CLI Sessions

Cisco networking devices use the word lines to refer to the software components that manage local and remote CLI sessions. You use the line console 0 global configuration command to enter line configuration mode to configure options, such as a password, for the console port.

Router# configure terminal
Router(config)# line console 0
Router(config-line)# password
password-string

Remote CLI sessions use lines that are referred to virtual teletypewriter (VTY) lines. You use the line vty line-number[ending-line-number]global configuration command to enter line configuration mode to configure options, such as a password, for remote CLI sessions.

Router# configure terminal
Router(config)# line vty
0 4
Router(config-line)# password
password-string

Protect Access to Cisco IOS XE EXEC Modes

Cisco IOS XE provides the ability to configure passwords that protect access to the following:

- Protecting Access to User EXEC Mode

- Protecting Access to Privileged EXEC mode

Protecting Access to User EXEC Mode

The first step in creating a secure environment for your networking device is protecting access to user EXEC mode by configuring passwords for local and remote CLI sessions.

You protect access to user EXEC mode for local CLI sessions by configuring a password on the console port. See the Configuring and Verifying a Password for Local CLI Sessions.

You protect access to user EXEC mode for remote CLI sessions by configuring a password on the virtual terminal lines (VTYs). See the Configuring and Verifying a Password for Remote CLI Sessions for instructions on how to configure passwords for remote CLI sessions.

Protecting Access to Privileged EXEC mode

The second step in creating a secure environment for your networking device is protecting access to privileged EXEC mode with a password. The method for protecting access to privileged EXEC mode is the same for local and remote CLI sessions.

You protect access to privileged EXEC mode by configuring a password for it. This is sometimes referred to as the enable password because the command to enter privileged EXEC mode is enable.

Command

Purpose

enable

Router> enable

Password

Router#

Enables privileged EXEC mode.

- Enter your password if prompted. The password will not be shown in the terminal window.

- The “>” at the end of the prompt string is changed to a “#” to indicate that you are in privileged EXEC mode.

Cisco IOS XE Password Encryption Levels

Some of the passwords that you configure on your networking device are saved in the configuration in plain text. This means that if you store a copy of the configuration file on a disk, anybody with access to the disk can discover the passwords by reading the configuration file. The following password types are stored as plain text in the configuration by default:

- Console passwords for local CLI sessions

- Virtual terminal line passwords for remote CLI sessions

- Username passwords using the default method for configuring the password

- Privileged EXEC mode password when it is configured with the enable password password command

- Authentication key chain passwords used by RIPv2 and EIGRP

- BGP passwords for authenticating BGP neighbors

- OSPF authentication keys for authenticating OSPF neighbors

- ISIS passwords for authenticating ISIS neighbors

This excerpt from a router configuration file shows examples of passwords and authentication keys that are stored as clear text.

!
enable password O9Jb6D
!
username username1 password 0 kV9sIj3
!
key chain trees
key 1
key-string willow
!
interface Ethernet1/0.1
ip address 172.16.6.1 255.255.255.0
ip router isis
ip rip authentication key-chain trees
ip authentication key-chain eigrp 1 trees
ip ospf authentication-key j7876
no snmp trap link-status
isis password u7865k
!
line vty 0 4
password V9jA5M
!

You can encrypt these clear text passwords in the configuration file by using the service password-encryption command. This should be considered only a minimal level of security because the encryption algorithm used by the service password-encryption command to encrypt passwords creates text strings that be decrypted using tools that are publicly available. You should still protect access to any electronic or paper copies of your configuration files after you use the service password-encryption command.

The service password-encryption command does not encrypt the passwords when they are sent to the remote device. Anybody with a network traffic analyzer who has access to you network can capture these passwords from the packets as they are transmitted between the devices. See the Configuring Password Encryption for Clear Text Passwords for more information on encrypting clear text passwords in configuration files.

Many of the Cisco IOS XE features that use clear text passwords can also be configured to use the more secure MD5 algorithm. The MD5 algorithm creates a text string in the configuration file that is much more difficult to decrypt. The MD5 algorithm does not send the password to the remote device. This prevents people using a traffic analyzer to capture traffic on your network from being able to discover your passwords.

You can determine the type of password encryption that has been used by the number that is stored with the password string in the configuration file of the networking device. The number 5 in the configuration excerpt below indicates that the enable secret password has been encrypted using the MD5 algorithm.

enable secret 5 $1$fGCS$rkYbR6.Z8xo4qCl3vghWQ0

The number 7 in the excerpt below indicates that the enable password has been encrypted using the less secure algorithm used by the service password-encryption command.

!

enable password 7 00081204

Cisco IOS XE CLI Session Usernames

After you have protected access to user EXEC mode and privileged EXEC mode by configuring passwords for them you can further increase the level of security on your networking device by configuring usernames to limit access to CLI sessions to your networking device to specific users.

Usernames that are intended to be used for managing a networking device can be modified with additional options such as:

See the Cisco IOS Security Command Reference . (http://www.cisco.com/en/US/docs/ios/security/command/reference/sec_book.html) for more information on how to configure the username command.

Cisco IOS XE Privilege Levels

The default configuration for Cisco IOS XE based networking devices uses privilege level 1 for user EXEC mode and privilege level 15 for privileged EXEC. The commands that can be run in user EXEC mode at privilege level 1 are a subset of the commands that can be run in privileged EXEC mode at privilege 15.

The privilege command is used to move commands from one privilege level to another. For example, some ISPs allow their first level technical support staff to enable and disable interfaces to activate new customer connections or to restart a connection that has stopped transmitting traffic. See the Example: Configuring a Device to Allow Users to Shutdown and Enable Interfaces for an example of how to configure this option.

The privilege command can also be used to assign a privilege level to a username so that when a user logs in with the username, the session will run at the privilege level specified by the privilege command. For example if you want your technical support staff to view the configuration on a networking device to help them troubleshoot network problems without being able to modify the configuration, you can create a username, configure it with privilege level 15, and configure it to run the show running-config command automatically. When a user logs in with the username the running configuration will be displayed automatically. The user’s session will be logged out automatically after the user has viewed the last line of the configuration. See the Example: Configuring a Device to Allow Users to View the Running Configuration for an example of how to configure this option.

These command privileges can also be implemented when using AAA with TACACS+ and RADIUS. For example, TACACS+ provides two ways to control the authorization of router commands on a per-user or per-group basis. The first way is to assign privilege levels to commands and have the router verify with the TACACS+ server whether or not the user is authorized at the specified privilege level. The second way is to explicitly specify in the TACACS+ server, on a per-user or per-group basis, the commands that are allowed. For more information about implementing AAA with TACACS+ and RADIUS, see the technical note How to Assign Privilege Levels with TACACS+ and RADIUS .

Cisco IOS XE Password Configuration

Cisco IOS XE software does not prompt you to repeat any passwords that you configure to verify that you have entered the passwords exactly as you intended. New passwords, and changes to existing passwords, go into effect immediately after you press the Enter key at the end of a password configuration command string. If you make a mistake when you enter a new password and have saved the configuration on the networking device to its startup configuration file and exited privileged EXEC mode before you realize that you made a mistake, you may find that you are no longer able to manage the device.

The following are common situations that can happen:

- You make a mistake configuring a password for local CLI sessions on the console port.

- If you have properly configured access to your networking device for remote CLI sessions, you can Telnet to it and reconfigure the password on the console port.

- You make a mistake configuring a password for remote Telnet or SSH sessions.

- If you have properly configured access to your networking device for local CLI sessions, you can connect a terminal to it and reconfigure the password for the remote CLI sessions.

- You make a mistake configuring a password for privileged EXEC mode (enable password or enable secret password).

- You will have to perform a lost password recovery procedure.

- You make a mistake configuring your username password, and the networking device requires that you log into it with your username.

- If you do not have access to another account name, you will have to perform a lost password recovery procedure.

To protect yourself from having to perform a lost password recovery procedure open two CLI sessions to the networking device and keep one of them in privilege EXEC mode while you reset the passwords using the other session. You can use the same device (PC or terminal) to run the two CLI sessions or two different devices. You can use a local CLI session and a remote CLI session or two remote CLI sessions for this procedure. The CLI session that you use to configure the password can also be used to verify that the password was changed properly. The other CLI session that you keep in privileged EXEC mode can be used to change the password again if you made a mistake the first time you configured it.

You should not save password changes that you have made in the running configuration to the startup configuration until you have verified that your password was changed successfully. If you discover that you made a mistake configuring a password, and you were not able to correct the problem using the second CLI session technique described above, you can power cycle the networking device so that it returns to the previous passwords that are stored in the startup configuration.

How To Configure Security with Passwords Privileges and Logins

- Protecting Access to User Exec Mode

- Protecting Access to Privileged EXEC Mode

- Configuring Security Options to Manage Access to CLI Sessions and Commands

- Recovering from a Lost or Misconfigured Password for Local Sessions

- Recovering from a Lost or Misconfigured Password for Remote Sessions

- Recovering from Lost or Misconfigured Passwords for Privileged EXEC Mode

Protecting Access to User Exec Mode

- Configuring and Verifying a Password for Remote CLI Sessions

- Configuring and Verifying a Password for Local CLI Sessions

Configuring and Verifying a Password for Remote CLI Sessions

This task will assign a password for remote CLI sessions. After you have completed this task the networking device will prompt you for a password the next time that you start a remote CLI session with it.

Cisco IOS XE based networking devices require that you have a password configured for remote CLI sessions. If you attempt to start a remote CLI session with a device that doesn’t have a password configured for remote CLI sessions you will see a message that a password is required and has not been set. The remote CLI session will be terminated by the remote host.

Before You Begin
If you have not previously configured a password for remote CLI sessions, you must perform this task over a local CLI session using a terminal or a PC running a terminal emulation application, attached to the console port.

Your terminal, or terminal emulation application, must be configured with the settings that are used by the console port on the networking device. The console ports on most Cisco networking devices require the following settings: 9600 baud, 8 data bits, 1 stop bit, no parity, and flow control is set to "none." See the documentation for your networking device if these settings do not work for your terminal.

To perform the verification step (Step 6) for this task, your networking device must have an interface that is in an operational state. The interface must have a valid IP address.

Note

If you have not previously configured a password for remote CLI sessions, you must perform this task over a local CLI session using a terminal attached to the console port.

>

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    line vty line-number [ending-line-number]

4.    password password

5.    end

6.    telnet ip-address

7.    exit

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

line vty line-number [ending-line-number]

Example:

Router(config)# line vty 0 4

Enters line configuration mode.

Step 4

password password

Example:

Router(config-line)# password H7x3U8

The argument password is a character string that specifies the line password. The following rules apply to the password argument:

- The first character cannot be a number.

- The string can contain any alphanumeric characters, including spaces, up to 80 characters. You cannot specify the password in the format number-space-anything.

- Passwords are case sensitive.

Step 5

end

Example:

Router(config-line)# end

Exits the current configuration mode and returns to privileged EXEC mode.

Step 6

telnet ip-address

Example:

Router# telnet 172.16.1.1

Start a remote CLI session with the networking device from your current CLI session using the IP address of an interface in the networking device that is in an operational state (interface up, line protocol up).

- Enter the password that you configured is step 4 when prompted.

Note:
This procedure is often referred to as a starting a recursive Telnet session because you are initiating a remote Telnet session with the networking device from the networking device itself.

Step 7

exit

Terminates the remote CLI session (recursive Telnet session) with the networking device.

- Troubleshooting Tips

- What to Do Next

Troubleshooting Tips

To display information for all users who have access to a lawful intercept view, issue the show users lawful-intercept command. (This command is available only to authorized lawful intercept view users.)

What to Do Next

Proceed to the Configuring and Verifying a Password for Local CLI Sessions .

Configuring and Verifying a Password for Local CLI Sessions

This task will assign a password for local CLI sessions over the console port. After you have completed this task, the networking device will prompt you for a password the next time that you start a local CLI session on the console port.

This task can be performed over a local CLI session using the console port or a remote CLI session. If you want to perform the optional step of verifying that you configured the password correctly you should perform this task using a local CLI session using the console port.

Before You Begin
If you want to perform the optional step of verifying the local CLI session password, you must perform this task using a local CLI session. You must have a terminal or a PC running a terminal emulation program, connected to the console port of the networking device. Your terminal must be configured with the settings that are used by the console port on the networking device. The console ports on most Cisco networking devices require the following settings: 9600 baud, 8 data bits, 1 stop bit, no parity, and flow control is set to "none." See the documentation for your networking device if these settings do not work for your terminal.

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    line console 0

4.    password password

5.    end

6.    exit

7.    Press the Enter key.

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

line console 0

Example:

Router(config)# line console 0

Enters line configuration mode and selects the console port as the line that you are configuring.

Step 4

password password

Example:

Router(config-line)# password Ji8F5Z

The argument password is a character string that specifies the line password. The following rules apply to the password argument:

- The first character cannot be a number.

- The string can contain any alphanumeric characters, including spaces, up to 80 characters. You cannot specify the password in the format number-space-anything.

- Passwords are case sensitive.

Step 5

end

Example:

Router(config-line)# end

Exits the current configuration mode and returns to privileged EXEC mode.

Step 6

exit

Example:

Router# exit

Exits privileged EXEC mode.

Step 7

Press the Enter key.

(Optional) Initiates the local CLI session on the console port.

- Enter the password that you configured is step 4 when prompted to verify that it was configured correctly.

Note:
This step can be performed only if you are using a local CLI session to perform this task.

- Troubleshooting Tips

- What to Do Next

Troubleshooting Tips

If your new password is not accepted proceed to the Configuration Examples for Configuring Security with Passwords Privileges and Logins for instructions on what to do next.

What to Do Next

Proceed to the Protecting Access to Privileged EXEC Mode.

Protecting Access to Privileged EXEC Mode

- Configuring and Verifying the Enable Password

- Configuring Password Encryption for Clear Text Passwords

- Configuring and Verifying the Enable Secret Password

Configuring and Verifying the Enable Password

Cisco no longer recommends that you use the enable password command to configure a password for privileged EXEC mode. The password that you enter with the enable passwordcommand is stored as plain text in the configuration file of the networking device. You can encrypt the password for the enable passwordcommand in the configuration file of the networking device using the service password-encryption command. However the encryption level used by the service password-encryption command can be decrypted using tools available on the Internet.

Instead of using the enable passwordcommand, Cisco recommends using the enable secret commandbecause it encrypts the password that you configure with it with strong encryption . For more information on password encryption issues see the Cisco IOS XE Password Encryption Levels. For information on configuring the enable secretcommand see the Configuring and Verifying the Enable Secret Password.

Note

The networking device must not have a password configured by the enable secret command in order to perform this task successfully. If you have already configured a password for privileged EXEC mode using the enable secretcommand, the password configured takes precedences over the password that you configure in this task using the enable password command.

You cannot use the same password for the enable secretcommand and the enable password command.

>

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    enable password password

4.    end

5.    exit

6.    enable

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

enable password password

Example:

Router(config)# enable password t6D77CdKq

The argument password is a character string that specifies the enable password. The following rules apply to the password argument:

- Must contain from 1 to 25 uppercase and lowercase alphanumeric characters.

- Must not have a number as the first character.

- Can have leading spaces, but they are ignored. However, intermediate and trailing spaces are recognized.

- Can contain the question mark (?) character if you precede the question mark with the key combination Crtl-v when you create the password; for example, to create the password abc?123, do the following:

- Enter abc

- Type Crtl-v

- Enter ?123

Step 4

end

Example:

Router(config)# end

Exits the current configuration mode and returns to privileged EXEC mode.

Step 5

exit

Example:

Router# exit

Exits privileged EXEC mode.

Step 6

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter the password you configured in step 3.

- Troubleshooting Tips

- What to Do Next

Troubleshooting Tips

If your new password is not accepted, proceed to the Recovering from Lost or Misconfigured Passwords for Privileged EXEC Mode section for instructions on what to do next.

What to Do Next

Encrypt the clear text enable password in the configuration file of the networking device using the procedure described in Configuring Password Encryption for Clear Text Passwords.

Configuring Password Encryption for Clear Text Passwords

Cisco IOS XE stores passwords in clear text in network device configuration files for several features such as passwords for local and remote CLI sessions, and passwords for neighbor authentication for routing protocols. Clear text passwords are a security risk because anybody with access to archived copies of the configuration files can discover the passwords that are stored as clear text. The service password-encryptioncommand can be used to encrypt clear text commands in the configuration files of networking devices. See the Cisco IOS XE Password Encryption Levels for more information.

Perform the following steps to configure password encryption for passwords that are stored as clear text in the configuration files of your networking device.

Before You Begin
You must have at least one feature that uses clear text passwords configured on your networking device for this command to have any immediate effect.

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    service password-encryption

4.    end

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

service password-encryption

Example:

Router(config)# service password-encryption

Example:

Enables Password encryption for all passwords clear text passwords, including username passwords, authentication key passwords, the privileged command password, console and virtual terminal line access passwords, and Border Gateway Protocol neighbor passwords.

Step 4

end

Example:

Router(config)# end

Exits the current configuration mode and returns to privileged EXEC mode.

Configuring and Verifying the Enable Secret Password

Cisco recommends that you use the enable secret command, instead of the enable password command to configure a password for privileged EXEC mode. The password created by the enable secret command is encrypted with the more secure MD5 algorithm.

Note

You cannot use the same password for the enable secretcommand and the enable password command.

>

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    enable secret password

4.    end

5.    exit

6.    enable

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

enable secret password

Example:

or

Example:

enable secret

5 previously-encrypted-password

Example:

Router(config)# enable secret t6D77CdKq

Example:

or

Example:

Router(config)# enable secret 5 $1$/x6H$RhnDI3yLC4GA01aJnHLQ4/

The argument password is a character string that specifies the enable secret password. The following rules apply to the password argument:

- Must contain from 1 to 25 uppercase and lowercase alphanumeric characters.

- Must not have a number as the first character.

- Can have leading spaces, but they are ignored. However, intermediate and trailing spaces are recognized.

- Can contain the question mark (?) character if you precede the question mark with the key combination Crtl-v when you create the password; for example, to create the password abc?123, do the following:

- Enter abc

- Type Crtl-v

- Enter ?123

or

Sets a previously encrypted password for privileged EXEC mode by entering the number 5 before the previously encrypted string. You must enter an exact copy of a password from a configuration file that was previously encrypted by the enable secret command to use this method.

Step 4

end

Example:

Router(config)# end

Exits the current configuration mode and returns to privileged EXEC mode.

Step 5

exit

Example:

Router# exit

Exits privileged EXEC mode.

Step 6

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter the password that you configured in Step 3.

- Troubleshooting Tips

- What to Do Next

Troubleshooting Tips

If your new password is not accepted proceed to the Configuration Examples for Configuring Security with Passwords Privileges and Logins for instructions on what to do next.

What to Do Next

If you have finished configuring passwords for local and remote CLI sessions and you want to configure additional security features, such as usernames, and privilege levels proceed to the Configuring Security Options to Manage Access to CLI Sessions and Commands.

Configuring Security Options to Manage Access to CLI Sessions and Commands

The tasks in this section describe how to configure your networking device to permit the use of a subset of privileged EXEC mode commands by users who should not have access to all of of the commands available in privileged EXEC mode.

These tasks are beneficial for companies that have multiple levels of network support staff and the company wants the staff at each level to have access to a different subset of the privileged EXEC mode commands.

In this task the users who should not have access to all of of the commands available in privileged EXEC mode are referred to as the first-line technical support staff.

This section contains the following procedures:

- Configuring the Networking Device for the First-Line Technical Support Staff

- Verifying the Configuration for the First-Line Technical Support Staff

- Configuring a Device to Require a Username for the First-Line Technical Support Staff

Configuring the Networking Device for the First-Line Technical Support Staff

This task describes how to configure the networking device for first-line technical support users. First-line technical support staff are usually not allowed to run all of the commands available in privileged EXEC mode (privilege level 15) on a networking device. They are prevented from running commands that they are not authorized for by not being granted access to the password assigned to privileged EXEC mode or to other roles that have been configured on the networking device.

The privilege command is used to move commands from one privilege level to another in order to create the additional levels of administration of a networking device that is required by companies that have different levels of network support staff with different skill levels.

The default configuration of a Cisco IOS XE device permits two types of users to access the CLI. The first type of user is a person who is only allowed to access user EXEC mode. The second type of user is a person who is allowed access to privileged EXEC mode. A user who is only allowed to access user EXEC mode is not allowed to view or change the configuration of the networking device, or to make any changes to the operational status of the networking device. On the other hand, a user who is allowed access to privileged EXEC mode can make any change to a networking device that is allowed by the CLI.

In this task the two commands that normally run at privilege level 15 are reset to privilege level 7 using the privilege command in order that first-line technical support users will be allowed to run the two commands. The two commands for which the privilege levels will be reset are the clear counters command and reload command.

- The clear counters command is used to reset the counter fields on interfaces for statistics such as packets received, packets transmitted, and errors. When a first-line technical support user is troubleshooting an interface related connectivity issue between networking devices, or with remote users connecting to the network, it is useful to reset the interface statistics to zero and them monitor the interfaces for a period of time to see if the values in the interface statistics counters change.

- The reload command is used initiate a reboot sequence for the networking device. One common use of the reload command by first-line technical support staff is to cause the networking device to reboot during a maintenance window so that it loads a new operating system that was previously copied onto the networking device’s file system by a user with a higher level of authority.

Any user that is permitted to know the enable secret password that is assigned to the first-line technical support user role privilege level can access the networking device as a first-line technical support user. You can add an additional level of security by configuring a username on the networking device and requiring that the users know the username and the password. Configuring a username as an additional level of security is described in the Configuring a Device to Require a Username for the First-Line Technical Support Staff.

Note

You must not have the aaa new-model command enabled on the networking device. You must not have the login local command configured for the local CLI sessions over the console port or the remote CLI sessions.

Note

For clarity, only the arguments and keywords that are relevant for each step are shown in the syntax for the steps in this task. See the Cisco IOS command reference book for your Cisco IOS release for further information on the additional arguments and keywords that can be used with these commands.

Caution

Do not use the no form of the privilege command to reset the privilege level of a command to its default because it might not return the configuration to the correct default state. Use the reset keyword for the privilege command instead to return a command to its default privilege level. For example, to remove the privilege exec level reload command from the configuration and return the reload command to its default privilege of 15, use the privilege exec reset reloadcommand.

>

SUMMARY STEPS

1.    enable password

2.    configure terminal

3.    enable secret level level password

4.    privilege exec level level command-string

5.    end

DETAILED STEPS

Step 1

enable password

Enters privileged EXEC mode. Enter the password when prompted.

Example:

Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:

Router# configure
terminal

Step 3

enable secret level level password

Configures a new enable secret password for privilege level 7.

Example:

Router(config)# enable
secret
level

7

Zy72sKj

Step 4

privilege exec level level command-string

Changes the privilege level of the clear counters command from privilege level 15 to privilege level 7.

Example:

Router(config)# privilege
exec
level

7

clear

counters

Step 5

end

Exits global configuration mode.

Example:

Router(config)# end

Verifying the Configuration for the First-Line Technical Support Staff

This task describes how to verify that the network device is configured correctly for the first-line technical support staff.

Before You Begin
The following commands must have been modified to run at privilege level 7 for this task:

- clear counters

- reload

SUMMARY STEPS

1.    enable level password

2.    show privilege

3.    clear counters

4.    clear ip route *

5.    reload in time

6.    reload cancel

7.    disable

8.    show privilege

DETAILED STEPS

Step 1

enable level password

Logs the user into the networking device at the privilege level specified for the level argument.

Example:

Router> enable

7

Zy72sKj

Step 2

show privilege

Displays the privilege level of the current CLI session

Example:

Router# show
privilege
Current privilege level is 7

Step 3

clear counters

The clear counters command clears the interface counters. This command has been changed from privilege level 15 to privilege level 7.

Example:

Router# clear
counters
Clear "show interface" counters on all interfaces [confirm]
Router#
02:41:37: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console

Step 4

clear ip route *

The ip route argument string for the clear command should not be allowed because it was not changed from privilege level 15 to privilege level 7.

Example:

Router# clear
ip
route

*
^
% Invalid input detected at '^' marker.
Router#

Step 5

reload in time

The reload command causes the networking device to reboot.

Example:

Router# reload
in

10
Reload scheduled in 10 minutes by console
Proceed with reload? [confirm]
Router#
***
*** --- SHUTDOWN in 0:10:00 ---
***
02:59:50: %SYS-5-SCHEDULED_RELOAD: Reload requested for 23:08:30 PST Sun Mar 20

Step 6

reload cancel

The reload cancel terminates a reload that was previously setup with the the reload in time command.

Example:

Router# reload
cancel
***
*** --- SHUTDOWN ABORTED ---
***
04:34:08: %SYS-5-SCHEDULED_RELOAD_CANCELLED:  Scheduled reload cancelled at 15:38:46 PST Sun Mar 27 2005

Step 7

disable

Exits the current privilege level and returns to privilege level 1.

Example:

Router# disable

Step 8

show privilege

Displays the privilege level of the current CLI session

Example:

Router> show
privilege
Current privilege level is 1

- Troubleshooting Tips

- What to Do Next

Troubleshooting Tips

If your configuration does not work the way that you want it to and you want to remove the privilege commands from the configuration, use the reset keyword for the privilege command to return the commands to their default privilege level. For example, to remove the command privilege exec level reload command from the configuration and return the reload command to its default privilege of 15 use the privilege exec reset reloadcommand.

What to Do Next

If you want to add an additional level of security by requiring that the first level technical staff use a login name, proceed to the Configuring a Device to Require a Username for the First-Line Technical Support Staff.

Configuring a Device to Require a Username for the First-Line Technical Support Staff

This task configures the networking device to require that the first-line technical support staff login to the networking device with a login name of admin. The admin username configured in this task is assigned the privilege level of 7 which will allow users who log in with this name to run the commands that were reassigned to privilege level 7 in the previous task. When a user successfully logs in with the admin username, the CLI session will automatically enter privilege level 7.

Before Cisco IOS XE Release 2.3, two types of passwords were associated with usernames: Type 0, which is a clear text password visible to any user who has access to privileged mode on the router, and type 7, which has a password encrypted by the service password encryption command.

In Cisco IOS XE Release 2.3 and later releases, the new secret keyword for the username command allows you to configure Message Digest 5 (MD5) encryption for username passwords.

Before You Begin
The following commands must have been modified to run at privilege level 7 for this task:

- clear counters

- reload

See the Configuring the Networking Device for the First-Line Technical Support Staff for instructions on how to change the privilege level for a command.

Note

MD5 encryption for the username command is not supported in versions of Cisco IOS software prior to Cisco IOS XE Release 2.3.

You must not have the aaa-new model command enabled on the networking device. You must not have the login local command configured for the local CLI sessions over the console port or the remote CLI sessions.

Note

For clarity, only the arguments and keywords that are relevant for each step are shown in the syntax for the steps in this task. Refer to the Cisco IOS command reference book for your Cisco IOS XE release for further information on the additional arguments and keywords that can be used with these commands.

>

SUMMARY STEPS

1.    enable t6D77CdKq

2.    configure terminal

3.    username username privilege level secret password

4.    end

5.    disable

6.    login username

7.    show privilege

8.    clear counters

9.    clear ip route *

10.    reload in time

11.    reload cancel

12.    disable

13.    show privilege

DETAILED STEPS

Step 1

enable t6D77CdKq

Enters privileged EXEC mode. Enter the password when prompted.

Example:

Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:

Router# configure
terminal

Step 3

username username privilege level secret password

Creates a username and applies MD5 encryption to the password text string.

Example:

Router(config)# username

admin
privilege

7
secret

Kd65xZa

Step 4

end

Exits global configuration mode.

Example:

Router(config)# end

Step 5

disable

Exits the current privilege level and returns to user EXEC mode.

Example:

Router# disable

Step 6

login username

Logs in the user. Enter the username and password you configured in step 3 when prompted.

Example:

Router> login

admin

Step 7

show privilege

The show privilege command displays the privilege level of the CLI session.

Example:

Router# show privilege
Current privilege level is 7

Step 8

clear counters

The clear counters command clears the interface counters. This command has been changed from privilege level 15 to privilege level 7.

Example:

Router# clear
counters
Clear "show interface" counters on all interfaces [confirm]
Router#
02:41:37: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console

Step 9

clear ip route *

The ip route argument string for the clear command is not allowed because it was not changed from privilege level 15 to privilege level 7.

Example:

Router# clear
ip
route

*
^
% Invalid input detected at '^' marker.
Router#

Step 10

reload in time

The reload command causes the networking device to reboot.

Example:

Router# reload
in

10
Reload scheduled in 10 minutes by console
Proceed with reload? [confirm]
Router#
***
*** --- SHUTDOWN in 0:10:00 ---
***
02:59:50: %SYS-5-SCHEDULED_RELOAD: Reload requested for 23:08:30 PST Sun Mar 20

Step 11

reload cancel

The reload cancel command terminates a reload that was previously setup with the the reload in time command.

Example:

Router# reload
cancel
***
*** --- SHUTDOWN ABORTED ---
***
04:34:08: %SYS-5-SCHEDULED_RELOAD_CANCELLED:  Scheduled reload cancelled at 15:38:46 PST Sun Mar 27 2005

Step 12

disable

Exits the current privilege level and returns to user EXEC mode.

Example:

Router# disable

Step 13

show privilege

Displays the privilege level of the current CLI session

Example:

Router> show
privilege
Current privilege level is 1

Recovering from a Lost or Misconfigured Password for Local Sessions

There are three methods that can be used to recover from a lost or misconfigured password for local CLI sessions over console port. The method that you will use depends on the current configuration of your networking device.

- Networking Device Is Configured to Allow Remote CLI Sessions

- Networking Device Is Not Configured to Allow Remote CLI Sessions

Networking Device Is Configured to Allow Remote CLI Sessions

The fastest method to recover from a lost, or misconfigured password for local CLI sessions is to establish a remote CLI session with the networking device and repeat the Configuring and Verifying a Password for Local CLI Sessions. Your networking device must be configured to allow remote CLI sessions and you must know the remote CLI session password to perform this procedure.

Networking Device Is Not Configured to Allow Remote CLI Sessions

- If you cannot establish a remote session to your networking device, and you have not saved the misconfigured local CLI session password to the startup configuration, you can restart the networking device. When the networking device starts up again it will read the startup configuration file. The previous local CLI session password is restored.

Caution

Restarting a networking device will cause it to stop forwarding traffic. This will also cause an interruption in any services that are running on the networking device, such as a DHCP server service, to stop. You should only restart a networking device during a period of time that has been allocated for network maintenance.

Recovering from a Lost or Misconfigured Password for Remote Sessions

There are three methods that can be used to recover from a lost, or misconfigured remote CLI session password. The method that you will use depends on the current configuration of your networking device.

- Networking Device Is Configured to Allow Local CLI Sessions

- Networking Device Is Not Configured to Allow Local CLI Sessions

Networking Device Is Configured to Allow Local CLI Sessions

The fastest method to recover from a lost, or misconfigured password for remote CLI sessions is to establish a local CLI session with the networking device and repeat the Configuring and Verifying a Password for Remote CLI Sessions. Your networking device must be configured to allow local CLI sessions and you must know the local CLI session password to perform this procedure.

Networking Device Is Not Configured to Allow Local CLI Sessions

- If you cannot establish a local CLI session to your networking device, and you have not saved the misconfigured remote CLI session password to the startup configuration, you can restart the networking device. When the networking device starts up again it will read the startup configuration file. The previous remote CLI session password is restored.

Caution

Restarting a networking device will cause it to stop forwarding traffic. This will also cause an interruption in any services that are running on the networking device, such as a DHCP server service, to stop. You should only restart a networking device during a period of time that has been allocated for network maintenance.

Recovering from Lost or Misconfigured Passwords for Privileged EXEC Mode

There are two methods that can be used to recover from a lost, or misconfigured Privileged EXEC Mode password. The method that you will use depends on the current configuration of your networking device.

- A Misconfigured Privileged EXEC Mode Password Has Not Been Saved

A Misconfigured Privileged EXEC Mode Password Has Not Been Saved

- If you have not saved the misconfigured privileged EXEC mode password to the startup configuration, you can restart the networking device. When the networking device starts up again it will read the startup configuration file. The previous privileged EXEC mode password is restored.

Caution

Restarting a networking device will cause it to stop forwarding traffic. This will also cause an interruption in any services that are running on the networking device, such as a DHCP server service, to stop. You should only restart a networking device during a period of time that has been allocated for network maintenance.

Configuration Examples for Configuring Security with Passwords Privileges and Logins

- Example: Configuring a Device to Allow Users to Clear Remote Sessions

- Example: Configuring a Device to Allow Users to View the Running Configuration

- Example: Configuring a Device to Allow Users to Shutdown and Enable Interfaces

Example: Configuring a Device to Allow Users to Clear Remote Sessions

The following example shows how to configure a networking device to allow a non administrative user to clear remote CLI session virtual terminal (VTY) lines.

The first section is an excerpt of the running configuration for this example. The following sections show you how this example is used.

The following section is an excerpt of the running-configuration:

!
privilege exec level 7 clear line
!
no aaa new-model
!
!
username admin privilege 7 secret 5 $1$tmIw$1aM7sadKhWMpkVTzxNw1J.
!
privilege exec level 7 clear line
!
! the privilege exec level 7 clear command below is entered automatically
! when you enter the privilege exec level 7 clear line command above, do
! not enter it again
!
privilege exec level 7 clear
!

The following section using the login command shows the user logging in to the networking device with the username of admin:

R1> login
Username: admin
Password:

The following section using the show privilege command shows that the current privilege level is 7:

R1# show privilege

Current privilege level is 7
R1#

The following section using the show user command shows that two users (admin and root) are currently logged in to the networking device:

R1# show user

Line       User       Host(s)              Idle       Location
*  0 con 0     admin      idle                 00:00:00
2 vty 0     root       idle                 00:00:17 172.16.6.2
Interface    User               Mode         Idle     Peer Address

The following section using the clear line 2 command terminates the remote CLI session in use by the username root:

R1# clear line  2

[confirm]
[OK]

The following section using the show user command shows that admin is the only user currently logged in to the networking device:

R1# show user
Line       User       Host(s)              Idle       Location
*  0 con 0     admin      idle                 00:00:00
Interface    User               Mode         Idle     Peer Address

Example: Configuring a Device to Allow Users to View the Running Configuration

The following example shows how to configure the networking device to allow a non administrative users (no access to privileged EXEC mode) to view the running configuration automatically. This example requires that the username is configured for privilege level 15 because many of the commands in the configuration file can be viewed only by users who have access to privilege level 15.

The solution is to temporarily allow the user access to privilege level 15 while running the show running-config command and then terminating the CLI session when the end of the configuration file has been viewed. In this example the networking device will automatically terminate the CLI session when the end of the configuration file has been viewed. No further configuration steps are required.

Caution

You must include the noescape keyword for the username command to prevent the user from entering an escape character that will terminate viewing the configuration file and leave the session running at privilege level 15.

!
!
username viewconf privilege 15 noescape secret 5 $1$zA9C$TDWD/Q0zwp/5xRwRqdgc/.
username viewconf autocommand show running-config
!

Example: Configuring a Device to Allow Users to Shutdown and Enable Interfaces

The following example shows how to configure a networking device to allow non administrative users to shutdown and enable interfaces.

The first section is an an excerpt of the running configuration for this example. The following sections show you how this example is used.

The following section is an excerpt of the running-configuration:

!
no aaa new-model
!
username admin privilege 7 secret 5 $1$tmIw$1aM7sadKhWMpkVTzxNw1J.
!
privilege interface all level 7 shutdown
privilege interface all level 7 no shutdown
privilege configure level 7 interface
privilege exec level 7 configure terminal
!
! the privilege exec level 7 configure command below is entered automatically
! when you enter the privilege exec level 7 configure terminal command above, do
! not enter it again
!
privilege exec level 7 configure
!

The following section using the login command shows the user logging in to the networking device with the username of admin:

R1> login
Username: admin
Password:

The following section using the show privilege command shows that the current privilege level is 7:

R1# show privilege
Current privilege level is 7

The following section using the show user command shows that admin is the only user currently logged in to the networking device:

R1# show user
Line       User       Host(s)              Idle       Location
*  0 con 0     admin      idle                 00:00:00
Interface    User               Mode         Idle     Peer Address

The following section shows that the admin user is permitted to shutdown and enable an interface:

R1# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)# interface ethernet 1/0
R1(config-if)# shutdown
R1(config-if)# no shutdown
R1(config-if)# exit
R1#

Where to Go Next

Once you have established a baseline of security for your networking devices you can consider more advanced options such as:

- Role-Based CLI Access--The role-based CLI access feature offers a more comprehensive set of options than the privilege command (described in this document) for network managers who want to allow different levels of technical support staff to have different levels of access to CLI commands.

- AAA Security--Many Cisco networking devices offer an advanced level of security using authentication, authorization and accounting (AAA) features. All of the tasks described in this document, and other - more advanced security features - can be implemented using AAA on the networking device in conjunction with a remote TACACS+ or RADIUS server. For information how to configure AAA security features that can be run locally on a networking device, or for information on how to configure remote AAA security using TACACS+ or RADIUS servers, see the Cisco IOS XE Security Configuration Guide:Securing User Services , Release 2.

Additional References

The following sections provide references related to Configuring Security with Passwords and, Login Usernames for CLI Sessions on Networking Devices.

Related Documents

Related Topic

Document Title

Managing user access to CLI commands and configuration information

“Role-Based CLI Access” in the Cisco IOS XE Security Configuration Guide: Securing User Services , Release 2

AAA Security Features

Cisco IOS XE Security Configuration Guide: Securing User Services , Release 2

Assigning privilege levels with TACACS+ and RADIUS

How to Assign Privilege Levels with TACACS+ and RADIUS

Standards

Standard

Title

No new or modified RFCs are supported by this functionality, and support for existing RFCs has not been modified.

--

MIBs

MIBs

MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL:

Click Here

RFCs

RFC

Title

No new or modified RFCs are supported by this functionality, and support for existing RFCs has not been modified.

--

Technical Assistance

Description

Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

Click Here

Feature Information for Configuring Security with Passwords Privileges and Logins

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Feature Information for Configuring Security with Passwords, Privilege Levels, and Login Usernames for CLI Sessions on Networking Devices

Feature Name

Releases

Feature Configuration Information

Enhanced Password Security

Cisco IOS XE 3.3SG

Cisco IOS XE 3.2SE

Cisco IOS XE 3.3SE

Using the Enhanced Password Security feature, you can configure MD5 encryption for username passwords. MD5 encryption is a one-way hash function that makes reversal of an encrypted password impossible, providing strong encryption protection. Using MD5 encryption, you cannot retrieve clear text passwords. MD5 encrypted passwords cannot be used with protocols that require that the clear text password be retrievable, such as Challenge Handshake Authentication Protocol (CHAP).

In Cisco IOS XE Release 3.2SE, this feature was supported on the following platforms:

- Catalyst 3850 Series Switches

- Cisco 5760 Wireless LAN Controller

In Cisco IOS XE Release 3.3SE, this feature was supported on the following platforms:

- Catalyst 3650 Series Switches

Chapter 2. Image Verification

The Image Verification feature allows users to automatically verify the integrity of Cisco IOS XE images and provisioning files. Thus, users can be sure that an image or provisioning file is protected from accidental corruption, which can occur at any time during transit, starting from the moment the files are generated by Cisco until they reach the user.

- Finding Feature Information

- Restrictions for Image Verification

- Information About Image Verification

- How to Use Image Verification

- Configuration Examples for Image Verification

- Additional References

- Feature Information for Image Verification

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Restrictions for Image Verification

Image Verification is applied to and attempted on any file; however, if the file is not an image file or provisioning file, image verification will not occur and you will see the following error, “SIGNATURE-4-NOT_PRESENT.”

Note

The Image Verification feature can only be used to check the integrity of a Cisco IOS XE software image or provisioning file that is stored on a Cisco IOS XE device. It cannot be used to check the integrity of an image on a remote file system or an image running in memory.

Information About Image Verification

Note

Throughout this document, any references to Cisco IOS XE images, also applies to provisioning files.

- Benefits of Image Verification

- How Image Verification Works

Benefits of Image Verification

The efficiency of Cisco IOS XE routers is improved because the routers can now automatically detect when the integrity of an image or provisioning file is accidentally corrupted as a result of transmission errors or disk corruption.

How Image Verification Works

Because a production image undergoes a sequence of transfers before it is copied into the memory of a router, the integrity of the image is at risk of accidental corruption every time a transfer occurs. When downloading an image from Cisco.com, a user can run a message-digest5 (MD5) hash on the downloaded image and verify that the MD5 digest posted on Cisco.com is the same as the MD5 digest that is computed on the user’s server. However, many users choose not to run an MD5 digest because it is 128-bits long and the verification is manual. Image verification allows the user to automatically validate the integrity of all downloaded images, thereby, significantly reducing user interaction.

How to Use Image Verification

- Globally Verifying the Integrity of an Image

- Verifying the Integrity of an Image That Is About to Be Copied

- Verifying the Integrity of an Image That Is About to Be Reloaded

Globally Verifying the Integrity of an Image

The file verify auto command enables image verification globally; that is, all images that are to be copied (via the copy command) or reloaded (via the reload command) are automatically verified. Although both the copy and reload commands have a /verify keyword that enables image verification, you must issue the keyword each time you want to copy or reload an image. The file verify auto command enables image verification by default, so you no longer have to specify image verification multiple times.

If you have enabled image verification by default but prefer to disable verification for a specific image copy or reload, the /noverify keyword, along with either the copy or the reload command, will override the file verify auto command.

Use this task to enable automatic image verification.

SUMMARY STEPS

1.    enable

2.    configure terminal

3.    file verify auto

4.    exit

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

file verify auto

Example:

Router(config)# file verify auto

Enables automatic image verification.

Step 4

exit

Example:

Router(config)# exit

Exits global configuration mode.

You must exit global configuration mode if you are going to copy or reload an image.

- What to Do Next

What to Do Next

After issuing the file verify auto command, you do not have to issue the /verify keyword with the copy or the reload command because each image that is copied or reloaded will be automatically verified.

Verifying the Integrity of an Image That Is About to Be Copied

When issuing the copy command, you can verify the integrity of the copied file by entering the /verify keyword. If the integrity check fails, the copied file will be deleted. If the file that is about to be copied does not have an embedded hash (an old image), you will be prompted whether or not to continue with the copying process. If you choose to continue, the file will be successfully copied; if you choose not to continue, the copied file will be deleted.

Without the /verify keyword, the copy command could copy a file that is not valid. Thus, after the copy command has been successfully executed, you can issue the verify command at any time to check the integrity of the files that are in the storage of the router.

Use this task to verify the integrity of an image before it is copied onto a router.

SUMMARY STEPS

1.    enable

2.    copy [/erase] [/verify| /noverify] source-url destination-url

3.    verify [/md5 [md5-value]] filesystem: file-url]

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

copy [/erase] [/verify| /noverify] source-url destination-url

Example:

Router# copy /verify tftp://10.1.1.1/username/c7200-js-mz disk0:

Copies any file from a source to a destination.

- /verify --Verifies the signature of the destination file. If verification fails, the file will be deleted.

- /noverify --Does not verify the signature of the destination file before the image is copied.

Note:
/noverify is often issued if the file verify auto command is enabled, which automatically verifies the signature of all images that are copied.

Step 3

verify [/md5 [md5-value]] filesystem: file-url]

Example:

Router# verify bootflash://c7200-kboot-mz.121-8a.E

(Optional) Verifies the integrity of the images in the router’s storage.

Verifying the Integrity of an Image That Is About to Be Reloaded

By issuing the reload command with the /verify keyword, the image that is about to be loaded onto your system will be checked for integrity. If the /verify keyword is specified, image verification will occur before the system initiates the reboot. Thus, if verification fails, the image will not be loaded.

Note

Because different platforms obtain the file that is to be loaded in various ways, the file specified in BOOTVAR will be verified. If a file is not specified, the first file on each subsystem will be verified. On certain platforms, because of variables such as the configuration register, the file that is verified may not be the file that is loaded.

Use this task to verify the integrity of an image before it is reloaded onto a router.

SUMMARY STEPS

1.    enable

2.    reload [[warm] [/verify| /noverify] text | [warm] [/verify| /noverify] in [hh : mm [text] | [warm] [/verify| /noverify] at hh : mm [month day | day month] [text] | [warm] [/verify| /noverify] cancel]

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

reload [[warm] [/verify| /noverify] text | [warm] [/verify| /noverify] in [hh : mm [text] | [warm] [/verify| /noverify] at hh : mm [month day | day month] [text] | [warm] [/verify| /noverify] cancel]

Example:

Router# reload /verify

Reloads the operating system.

- /verify--Verifies the signature of the destination file. If verification fails, the file will be deleted.

- /noverify --Does not verify the signature of the destination file before the image is reloaded.

Note:
/noverify is often issued if the file verify auto command is enabled, which automatically verifies the signature of all images that are copied.

Configuration Examples for Image Verification

- Global Image Verification Example

- Image Verification via the copy Command Example

- Image Verification via the reload Command Example

- Verify Command Sample Output Example

Global Image Verification Example

The following example shows how to enable automatic image verification. After enabling this command, image verification will automatically occur for all images that are either copied (via the copy command) or reloaded (via the reload command).

Router(config)# file verify auto

Image Verification via the copy Command Example

The following example shows how to specify image verification before copying an image:

Router# copy /verify tftp://10.1.1.1/jdoe/c7200-js-mz disk0:
Destination filename [c7200-js-mz]?
Accessing tftp://10.1.1.1/jdoe/c7200-js-mz...
Loading jdoe/c7200-js-mz from 10.1.1.1 (via FastEthernet0/0):!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 19879944 bytes]
19879944 bytes copied in 108.632 secs (183003 bytes/sec)
Verifying file integrity of disk0:/c7200-js-mz  ..................................................................................
..................................................................................
..................................................................................
.........................Done!
Embedded Hash         MD5 :CFA258948C4ECE52085DCF428A426DCD
Computed Hash                MD5 :CFA258948C4ECE52085DCF428A426DCD
CCO Hash                        MD5 :44A7B9BDDD9638128C35528466318183
Signature Verified

Image Verification via the reload Command Example

The following example shows how to specify image verification before reloading an image onto the router:

Router# reload /verify
Verifying file integrity of bootflash:c7200-kboot-mz.121-8a.E
%ERROR:Signature not found in file bootflash:c7200-kboot-mz.121-8a.E.
Signature not present. Proceed with verify? [confirm]
Verifying file disk0:c7200-js-mz ..........................................................................
............................................................Done!
Embedded Hash           MD5 :CFA258948C4ECE52085DCF428A426DCD
Computed Hash               MD5 :CFA258948C4ECE52085DCF428A426DCD
CCO Hash                MD5 :44A7B9BDDD9638128C35528466318183
Signature Verified
Proceed with reload? [confirm]n

Verify Command Sample Output Example

The following example shows how to specify image verification via the verify command:

Router# verify disk0:c7200-js-mz
%Filesystem does not support verify operations
Verifying file integrity of disk0:c7200-js-mz.......................................
...............................................................................Done!
Embedded Hash           MD5 :CFA258948C4ECE52085DCF428A426DCD
Computed Hash               MD5 :CFA258948C4ECE52085DCF428A426DCD
CCO Hash                MD5 :44A7B9BDDD9638128C35528466318183

Signature Verified

Additional References

The following sections provide references related to the Image Verification feature.

Related Documents

Related Topic

Document Title

Configuration tasks and information for loading, maintaining, and rebooting system images

Cisco ASR 1000 Series Aggregation Services Routers Software Configuration Guide

Additional commands for loading, maintaining, and rebooting system images

Cisco IOS Master Command List, All Releases

Standards

Standard

Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

--

MIBs

MIB

MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL:

Click Here

RFCs

RFC

Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.

--

Technical Assistance

Description

Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

Click Here

Feature Information for Image Verification

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Feature Information for Image Verification

Feature Name

Releases

Feature Information

Image Verification

Cisco IOS XE 3.2SE

Cisco IOS XE 3.3SE

The Image Verification feature allows users to automatically verify the integrity of Cisco IOS XE images.

In Cisco IOS XE Release 3.2SE, this feature was supported on the following platforms:

- Catalyst 3850 Series Switches

- Cisco 5760 Wireless LAN Controller

In Cisco IOS XE Release 3.3SE, this feature was supported on the following platforms:

- Catalyst 3650 Series Switches

The following commands were introduced or modified: copy, file verify auto, reload, verify.

Chapter 3. Role-Based CLI Access

The Role-Based CLI Access feature allows the network administrator to define views, which are a set of operational commands and configuration capabilities that provide selective or partial access to Cisco IOS EXEC and configuration (config) mode commands. Views restrict user access to Cisco IOS command-line interface (CLI) and configuration information; that is, a view can define what commands are accepted and what configuration information is visible. Thus, network administrators can exercise better control over access to Cisco networking devices.

- Finding Feature Information

- Prerequisites for Role-Based CLI Access

- Restrictions for Role-Based CLI Access

- Information About Role-Based CLI Access

- How to Use Role-Based CLI Access

- Configuration Examples for Role-Based CLI Access

- Additional References for Role-Based CLI Access

- Feature Information for Role-Based CLI Access

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Prerequisites for Role-Based CLI Access

Your image must support CLI views.

Restrictions for Role-Based CLI Access

Lawful Intercept Images Limitation

CLI views are a part of all platforms and Cisco IOS images because they are a part of the Cisco IOS parser. However, the lawful intercept view is available only in images that contain the lawful intercept subsystem.

Maximum Number of Allowed Views

The maximum number of CLI views and superviews, including one lawful intercept view, that can be configured is 15. (This does not include the root view.)

Information About Role-Based CLI Access

- Benefits of Using CLI Views

- Root View

- Lawful Intercept View

- Superview

- View Authentication via a New AAA Attribute

Benefits of Using CLI Views

Although users can control CLI access via both privilege levels and enable mode passwords, these functions do not provide network administrators with the necessary level of detail needed when working with Cisco IOS devices. CLI views provide a more detailed access control capability for network administrators, thereby, improving the overall security and accountability of Cisco IOS software.

As of Cisco IOS Release 12.3(11)T, network administrators can also specify an interface or a group of interfaces to a view; thereby, allowing access on the basis of specified interfaces.

Root View

When a system is in root view, it has all of the access privileges as a user who has level 15 privileges. If the administrator wishes to configure any view to the system (such as a CLI view, a superview, or a lawful intercept view), the system must be in root view.

The difference between a user who has level 15 privileges and a root view user is that a root view user can configure a new view and add or remove commands from the view. Also, when you are in a CLI view, you have access only to the commands that have been added to that view by the root view user.

Lawful Intercept View

Like a CLI view, a lawful intercept view restricts access to specified commands and configuration information. Specifically, a lawful intercept view allows a user to secure access to lawful intercept commands that are held within the TAP-MIB, which is a special set of simple network management protocol (SNMP) commands that store information about calls and users.

Commands available in lawful intercept view belong to one of the these categories:

- Lawful intercept commands that should not be made available to any other view or privilege level

- CLI views that are useful for lawful intercept users but do not have to be excluded from other views or privilege levels

Superview

A superview consists of one or more CLI views, which allow users to define what commands are accepted and what configuration information is visible. Superviews allow a network administrator to easily assign all users within configured CLI views to a superview instead of having to assign multiple CLI views to a group of users.

Superviews contain these characteristics:

- A CLI view can be shared among multiple superviews.

- Commands cannot be configured for a superview; that is, you must add commands to the CLI view and add that CLI view to the superview.

- Users who are logged into a superview can access all of the commands that are configured for any of the CLI views that are part of the superview.

- Each superview has a password that is used to switch between superviews or from a CLI view to a superview.

- If a superview is deleted, its associated CLI views are not deleted.

View Authentication via a New AAA Attribute

View authentication is performed by an external authentication, authorization, and accounting (AAA) server via the new attribute cli-view-name.

AAA authentication associates only one view name to a particular user; that is, only one view name can be configured for a user in an authentication server.

How to Use Role-Based CLI Access

- Configuring a CLI View

- Configuring a Lawful Intercept View

- Configuring a Superview

- Monitoring Views and View Users

Configuring a CLI View

Perform this task to create a CLI view and add commands or interfaces to the view, as appropriate.

Before You Begin
Before you create a view, you must perform the following tasks:

- Enable AAA via the aaa new-model command .

- Ensure that your system is in root view-not privilege level 15.

SUMMARY STEPS

1.    enable view

2.    configure terminal

3.    parser view view-name [inclusive]

4.    secret [0 | 5] encrypted-password

5.    commands parser-mode {exclude | include-exclusive | include} [all] [interface interface-name | command]

6.    end

7.    enable [privilege-level | view view-name]

8.    show parser view all

DETAILED STEPS

Command or Action

Purpose

Step 1

enable view

Example:

Device> enable view

Enables root view.

- Enter your privilege level 15 password (for example, root password) if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

parser view view-name [inclusive]

Example:

Device(config)# parser view first inclusive
Device(config-view)#

Creates a view including all commands by default. If the inclusive keyword option is not selected, it creates a view excluding all commands by default. You are in the view configuration mode.

Step 4

secret [0 | 5] encrypted-password

Example:

Device(config-view)# secret 5 secret

Associates a CLI view or superview with a password.

Note:
You must issue this command before you can configure additional attributes for the view.

Note:   With CSCts50236, the password can be removed or overwritten. Use the no secret command to remove the configured password.

Step 5

commands parser-mode {exclude | include-exclusive | include} [all] [interface interface-name | command]

Example:

Device(config-view)# commands exec include show version

Adds commands or interfaces to a view and specifies the mode in which the specified command exists.

Step 6

end

Example:

Device(config-view)# end

Exits view configuration mode and returns to privileged EXEC mode.

Step 7

enable [privilege-level | view view-name]

Example:

Device# enable view first

Prompts you for a password to access a configured CLI view, and you can switch from one view to another view.

Enter the password to access the CLI view.

Step 8

show parser view all

Example:

Device# show parser view all

(Optional) Displays information for all views that are configured on the device.

Note:
Although this command is available for both root and lawful intercept users, the all keyword is available only to root users. However, the all keyword can be configured by a user in root view to be available for users in lawful intercept view and CLI view.

- Troubleshooting Tips

Troubleshooting Tips

You must associate a password with a view. If you do not associate a password, and you attempt to add commands to the view using the commands command, a system message such as the following is displayed:

%Password not set for view <viewname>.

Configuring a Lawful Intercept View

Perform this task to initialize and configure a view for lawful-intercept-specific commands and configuration information.

Before You Begin
Before you initialize a lawful intercept view, ensure that the privilege level is set to 15 using the privilege command.

Note

Only an administrator or a user who has level 15 privileges can initialize a lawful intercept view.

SUMMARY STEPS

1.    enable view

2.    configure terminal

3.    li-view li-password user username password password

4.    username lawful-intercept [name] [privilege privilege-level | view view-name] password password

5.    parser view view-name

6.    secret 5 encrypted-password

7.    name new-name

DETAILED STEPS

Command or Action

Purpose

Step 1

enable view

Example:

Device> enable view

Enables root view.

- Enter your privilege level 15 password (for example, root password) if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

li-view li-password user username password password

Example:

Device(config)# li-view lipass user li_admin password li_adminpass

Initializes a lawful intercept view.

After the li-view is initialized, you must specify at least one user via user username password password options.

Step 4

username lawful-intercept [name] [privilege privilege-level | view view-name] password password

Example:

Device(config)# username lawful-intercept li-user1 password li-user1pass

Configures lawful intercept users on a Cisco device.

Step 5

parser view view-name

Example:

Device(config)# parser view li view name

(Optional) Enters view configuration mode, which allows you to change the lawful intercept view password or the lawful intercept view name.

Step 6

secret 5 encrypted-password

Example:

Device(config-view)# secret 5 secret

(Optional) Changes an existing password for a lawful intercept view.

Step 7

name new-name

Example:

Device(config-view)# name second

(Optional) Changes the name of a lawful intercept view.

If this command is not issued, the default name of the lawful intercept view is “li-view.”

- Troubleshooting Tips

Troubleshooting Tips

To display information for all users who have access to a lawful intercept view, issue the show users lawful-intercept command. (This command is available only to authorized lawful intercept view users.)

Configuring a Superview

Perform this task to create a superview and add at least one CLI view to the superview.

Before You Begin
Before adding a CLI view to a superview, ensure that the CLI views that are added to the superview are valid views in the system; that is, the views have been successfully created using the parser view command.

Note

You can add a view to a superview only after you configure a password for the superview (using the secret 5 command). Thereafter, issue the view command in view configuration mode to add at least one CLI view to the superview.

SUMMARY STEPS

1.    enable view

2.    configure terminal

3.    parser view superview-name superview

4.    secret 5 encrypted-password

5.    view view-name

6.    end

7.    show parser view all

DETAILED STEPS

Command or Action

Purpose

Step 1

enable view

Example:

Device> enable view

Enables root view.

- Enter your privilege level 15 password (for example, root password) if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

parser view superview-name superview

Example:

Device(config)# parser view su_view1 superview

Creates a superview and enters view configuration mode.

Step 4

secret 5 encrypted-password

Example:

Device(config-view)# secret 5 secret

Associates a CLI view or superview with a password.

Note:
You must issue this command before you can configure additional attributes for the view.

Step 5

view view-name

Example:

Device(config-view)# view view_three

Adds a normal CLI view to a superview.

Issue this command for each CLI view that is to be added to a given superview.

Step 6

end

Example:

Device(config-view)# end
Device#

Exits view configuration mode and returns to privileged EXEC mode.

Step 7

show parser view all

Example:

Device# show parser view

(Optional) Displays information for all views that are configured on the device.

Note:
Although this command is available for both root and lawful intercept users, the all keyword is available only to root users. However, the all keyword can be configured by a user in root view to be available for users in lawful intercept view and CLI view.

Monitoring Views and View Users

To display debug messages for all views-root, CLI, lawful intercept, and superview-use the debug parser view command in privileged EXEC mode.

Configuration Examples for Role-Based CLI Access

- Example: Configuring a CLI View

- Example: Verifying a CLI View

- Example: Configuring a Lawful Intercept View

- Example: Configuring a Superview

Example: Configuring a CLI View

The following example shows how to configure two CLI views, “first” and “second". Thereafter, you can verify the CLI view in the running configuration.

Device(config)# parser view first inclusive
Device(config-view)# secret 5 firstpass
Device(config-view)# command exec exclude show version
Device(config-view)# command exec exclude configure terminal
Device(config-view)# command exec exclude all show ip
Device(config-view)# exit
Device(config)# parser view second
Device(config-view)# secret 5 secondpass
Device(config-view)# command exec include-exclusive show ip interface
Device(config-view)# command exec include logout
Device(config-view)# exit
!
!
Device(config-view)# do show running-config | beg view

parser view first inclusive
secret 5 $1$MCmh$QuZaU8PIMPlff9sFCZvgW/
commands exec exclude configure terminal
commands exec exclude configure
commands exec exclude all show ip
commands exec exclude show version
commands exec exclude show
!
parser view second
secret 5 $1$iP2M$R16BXKecMEiQesxLyqygW.
commands exec include-exclusive show ip interface
commands exec include show ip
commands exec include show
commands exec include logout
!

Example: Verifying a CLI View

After you have configured the CLI views “first” and “second", you can issue the enable viewcommand to verify which commands are available in each view. The following example shows which commands are available inside the CLI view “first” after the user has logged into this view. (Because the show ip command is configured with the all option, a complete set of suboptions is shown, except the show ip interface command, which is using the include-exclusive keyword in the second view.)

Device# enable view first
Password:
Device# ?
Exec commands:
configure  Enter configuration mode
enable     Turn on privileged commands
exit       Exit from the EXEC
show       Show running system information
Device# show ?
ip       IP information
parser   Display parser information
version  System hardware and software status
Device# show ip ?

access-lists            List IP access lists
accounting              The active IP accounting database
aliases                 IP alias table
arp                     IP ARP table
as-path-access-list     List AS path access lists
bgp                     BGP information
cache                   IP fast-switching route cache
casa                    display casa information
cef                     Cisco Express Forwarding
community-list          List community-list
dfp                     DFP information
dhcp                    Show items in the DHCP database
drp                     Director response protocol
dvmrp                   DVMRP information
eigrp                   IP-EIGRP show commands
extcommunity-list       List extended-community list
flow                    NetFlow switching
helper-address          helper-address table
http                    HTTP information
igmp                    IGMP information
irdp                    ICMP Device Discovery Protocol
.
.
.

Example: Configuring a Lawful Intercept View

The following example shows how to configure a lawful intercept view, add users to the view, and verify the users that were added:

!Initialize the LI-View.
Device(config)# li-view lipass user li_admin password li_adminpass
Device(config)# end
! Enter the LI-View; that is, check to see what commands are available within the view.
Device# enable view li-view
Password:
Device# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Device(config)# parser view li-view

Device(config-view)# ?
View commands:
commands  Configure commands for a view
default   Set a command to its defaults
exit      Exit from view configuration mode
name      New LI-View name
no        Negate a command or set its defaults
password  Set a password associated with CLI views
Device(config-view)#
! NOTE:LI View configurations are never shown as part of ‘running-configuration’.
! Configure LI Users.
Device(config)# username lawful-intercept li-user1 password li-user1pass

Device(config)# username lawful-intercept li-user2 password li-user2pass
! Displaying LI User information.
Device# show users lawful-intercept
li_admin
li-user1
li-user2
Device#

Note

The lawful intercept view is available only on specific images and the view name option is available only in the LI view.

Example: Configuring a Superview

The following sample output from the show running-config command shows that “view_one” and “view_two” have been added to superview “su_view1", “view_three”, and “view_four” have been added to superview “su_view2”:

Device# show running-config
!
parser view su_view1 superview
secret 5 <encoded password>
view view_one
view view_two
!
parser view su_view2 superview
secret 5 <encoded password>
view view_three
view view_four
!

Additional References for Role-Based CLI Access

Related Documents

Related Topic

Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

Security commands

- Cisco IOS Security Command Reference: Commands A to C

- Cisco IOS Security Command Reference: Commands D to L

- Cisco IOS Security Command Reference: Commands M to R

- Cisco IOS Security Command Reference: Commands S to Z

SNMP, MIBs, CLI configuration

Cisco IOS Network Management Configuration Guide , Release 15.0.

Privilege levels

"Configuring Security with Passwords, Privileges and Logins" module.

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

Click Here

Feature Information for Role-Based CLI Access

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to Click Here . An account on Cisco.com is not required.

Feature Information for Role-Based CLI Access

Feature Name

Releases

Feature Information

Role-Based CLI Access

Cisco IOS XE 3.1.0SG

The Role-Based CLI Access feature enables network administrators to restrict user access to CLI and configuration information.

The CLI view capability was extended to restrict user access on a per-interface level, and additional CLI views were introduced to support the extended view capability. Also, support to group configured CLI views into a superview was introduced.

The following commands were introduced or modified: commands (view), enable, li-view, name (view), parser view , parser view superview, secret, show parser view, show users, username, and view.

Role-Based CLI Inclusive Views

Cisco IOS XE 3.6E

The Role-Based CLI Inclusive Views feature enables a standard CLI view including all commands by default.

In Cisco IOS XE Release 3.6E, this feature was supported on the following platforms:

- Catalyst 4500E Supervisor Engine 7L-E

- Catalyst 4500E Supervisor Engine 8-E

- Catalyst 3850 Series Switches

- Catalyst 3650 Series Switches

- Cisco 5760 Wireless LAN Controller

The following command was modified: parser view inclusive.