cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2680
Views
0
Helpful
2
Comments
Abaji Rawool
Level 3
Level 3

Introduction

 

This  configuration example is meant to be interpreted with the aid of the  official documentation from the configuration guide located here:

http://www.cisco.com/en/US/docs/ios/sec_user_services/configuration/guide/sec_role_base_cli.html#wp1...

 

 

Prerequisites

 

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. (command: "enable view" and use the enable password or enable secret)

 

 

Configure

 

Create Role based CLI for usera and userb on Router and link it with users configured on ACS 5.x. Roles are defined in the table

 

Configuration Information for CLI Views

 

User Name

Roles

Usera

Show  ip route

Show running-configuration

Userb

Configure-terminal

All commands starting with keyword “crypto”

 

 

Configurations

 

Configure aaa on the router

conf t

 

aaa new-model

aaa authentication login CONSOLE none

aaa authentication login ACS group tacacs+

aaa authorization exec ACS group tacacs+

 

 

line vty 0 4

login authentication ACS

authorization exec ACS

 

 

Configure tacacs server

tacacs-server host 192.168.1.1

tacacs-server key cisco

 

Before enabling view if you are trying to configure this from console after configuring the enable password make sure to exit out and connect to console again. If you do not have authentication configured for console, then you will see this below error message.

 

%AAA-6-USER_BLOCKED: Enable view requires to be authenticated by non-none methods,Please use the appropriate method with the login authentication.

 

R2>en
Password:
R2#
R2#enable view
Password:

 

After enabling view with a password, we can protect the console.

 

R2(config)#line con 0

R2(config)#login authentication CONSOLE

 

 

R2(config)# parser view usera
secret cisco
commands exec include show ip route
commands exec include show running-config
commands exec include show

 

parser view userb
secret cisco
commands configure include all crypto
commands exec include configure terminal
commands exec include configure
commands exec include all crypto

 

Add the router as Network device in ACS

 

1.png

 

create two users and add them to two groups

 

2.png

 

Create two shell profiles and add a custom attribute cli-view-name for usera and Userb

 

3.png

 

 

4.png

 

 

Map the shell profiles to the two users

 

 5.png6.png

 

 

Verify

 

R4#telnet 33.33.4.3
Trying 33.33.4.3 ... Open
username: usera
password:

R3>?
Exec commands:
  <1-1>    Slot Number
  <1-99>   Session number to resume
  do-exec  Mode-independent "do-exec" prefix support
  enable   Turn on privileged commands
  exit     Exit from the EXEC
  show     Show running system information

  -------------------
 
R4#
R4#telnet 33.33.4.3
Trying 33.33.4.3 ... Open
username: userb
password:

R3>?
Exec commands:
  <1-1>      Slot Number
  <1-99>     Session number to resume
  configure  Enter configuration mode
  crypto     Encryption related commands.
  do-exec    Mode-independent "do-exec" prefix support
  enable     Turn on privileged commands
  exit       Exit from the EXEC
  show       Show running system information

R3>conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)>?
Configure commands:
  crypto   Encryption module
  do-exec  To run exec commands in config mode
  exit     Exit from configure mode

R3(config)>crypto ?
  call          Configure Crypto Call Admission Control
  ctcp          Configure cTCP encapsulation
  dynamic-map   Specify a dynamic crypto map template
  engine        Enter a crypto engine configurable menu
  gdoi          Configure GDOI policy
  identity      Enter a crypto identity list
  ikev2         Configure IKEv2 Options
  ipsec         Configure IPSEC policy
  isakmp        Configure ISAKMP policy
  key           Long term key operations
  keyring       Key ring commands
  logging       logging messages
  map           Enter a crypto map
  mib           Configure Crypto-related MIB Parameters
  pki           Public Key components
  provisioning  Secure Device Provisioning
  vpn           Configure crypto vpn commands
  wui           Crypto HTTP configuration interfaces
  xauth         X-Auth parameters

Comments
mohsen_hoseinimoghaddam
Community Member

Hi

Thanks for the useful post. I have been trying to do this using tac_plus and it has been kinda successful. I just wanted to know if there is anyway for the users to see the # instead of > as they are logged in.

Thank you

 

petrdubinin
Level 1
Level 1

mohsen_hoseinim... - do you have a working example how'd you do that with tac_plus ? 


I'm trying to make a restricted view and command authorization with tac_plus but still has no luck..  Only NAS and Privelege-level restrictions are working, but I need to hide a part of config, and restrict commands..

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: