![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Role-Based CLI Access
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents
Role-Based CLI AccessLast Updated: January 26, 2012
First Published: February 24, 2004 Last Updated: March 30, 2011 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 InformationYour software release may not support all the features documented in this module. For the latest feature information and caveats, see 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 document. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Restrictions for Role-Based CLI AccessInformation About Role-Based CLI Access
Benefits of Using CLI ViewsAlthough 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 routers and switches. 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 ViewWhen 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. About Lawful Intercept ViewsLike 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:
About SuperviewsA 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:
View Authentication via a New AAA AttributeView 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 ViewBefore You Begin
SUMMARY STEPS
Before you create a view, you must perform the following tasks:
DETAILED STEPS Troubleshooting TipsAfter you have successfully created a view, a system message such as the following is displayed: %PARSER-6-VIEW_CREATED: view 'first' successfully created. After you have successfully deleted a view, a system message such as the following is displayed: %PARSER-6-VIEW_DELETED: view 'first' successfully deleted. You must associate a password with a view. If you do not associate a password, and you attempt to add commands to the view via the commands command, a system message such as the following will be displayed: %Password not set for view <viewname>. Configuring a Lawful Intercept ViewPerform this task to initialize and configure a view for lawful-intercept-specific commands and configuration information. Before You Begin
SUMMARY STEPS
Before you initialize a lawful intercept view, ensure that the privilege level is set to 15 via the privilege command.
DETAILED STEPS
Configuring a SuperviewBefore You Begin
SUMMARY STEPS
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 via the parser view command.
DETAILED STEPS
Configuration Examples for Role-Based CLI Access
Example Configuring a CLI ViewThe following example shows how to configure two CLI views, "first" and "second." Thereafter, you can verify the CLI view in the running configuration. Router(config)# parser view first 00:11:40:%PARSER-6-VIEW_CREATED:view 'first' successfully created. Router(config-view)# secret 5 firstpass Router(config-view)# command exec include show version Router(config-view)# command exec include configure terminal Router(config-view)# command exec include all show ip Router(config-view)# exit Router(config)# parser view second 00:13:42:%PARSER-6-VIEW_CREATED:view 'second' successfully created. Router(config-view)# secret 5 secondpass Router(config-view)# command exec include-exclusive show ip interface Router(config-view)# command exec include logout Router(config-view)# exit ! ! Router(config-view)# do show run | beg view parser view first secret 5 $1$MCmh$QuZaU8PIMPlff9sFCZvgW/ commands exec include configure terminal commands exec include configure commands exec include all show ip commands exec include show version commands exec include 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 ViewAfter 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.) Router# enable view first Password: 00:28:23:%PARSER-6-VIEW_SWITCH:successfully set to view 'first'. Router# ? Exec commands: configure Enter configuration mode enable Turn on privileged commands exit Exit from the EXEC show Show running system information Router# show ? ip IP information parser Display parser information version System hardware and software status Router# 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 Router Discovery Protocol . . . Example Configuring a Lawful Intercept ViewThe 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. Router(config)# li-view lipass user li_admin password li_adminpass 00:19:25:%PARSER-6-LI_VIEW_INIT:LI-View initialized. Router(config)# end ! Enter the LI-View; that is, check to see what commands are available within the view. Router# enable view li-view Password: Router# 00:22:57:%PARSER-6-VIEW_SWITCH:successfully set to view 'li-view'. Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# parser view li-view Router(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 ===This option only resides in LI View. no Negate a command or set its defaults password Set a password associated with CLI views Router(config-view)# ! NOTE:LI View configurations are never shown as part of 'running-configuration'. ! Configure LI Users. Router(config)# username lawful-intercept li-user1 password li-user1pass Router(config)# username lawful-intercept li-user2 password li-user2pass ! Displaying LI User information. Router# show users lawful-intercept li_admin li-user1 li-user2 Router# Example Configuring a SuperviewThe following sample output from the show running-config command shows that "view_one" and "view_two" have been added to superview "su_view1," and "view_three" and "view_four" have been added to superview "su_view2": ! 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 ReferencesRelated Documents
MIBsTechnical Assistance
Feature Information for Role-Based CLI AccessThe 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 www.cisco.com/go/cfn. An account on Cisco.com is not required.
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2012 Cisco Systems, Inc. All rights reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||