Jump to content
Калькуляторы

ASR-1002X - вопрос по привилегиям

Добрый день! Cisco ASR1002-X, с софтом Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.4(3)S

 

Имеется пользователь с ограниченными правами:

username xxxYYY privilege 3 ...

 

Хочу дать ему право на выполнение команды в контексте интерфейса:

encapsulation dot1Q  xxx second-dot1q yyy

 

Что я ввёл от имени суперпользователя:

privilege interface level 3 encapsulation dot1Q

 

Это дало открыло мне возможность задавать одиночный тег от имени пользователя с ограничеными правами, то есть команду:

encapsulation dot1Q  xxx

 

Как дать привилегию на добавление второго тега?

 

пробовал:

privilege interface level 3 encapsulation dot1Q second-dot1q

privilege interface level 3 encapsulation dot1Q * second-dot1q

privilege interface level 3 encapsulation dot1Q all second-dot1q

 

Какой символ обозначает "любое количество любых символов" при прописывании привилегий? Может я ошибаюсь, это не "*", а что-то другое?


 

 

Share this post


Link to post
Share on other sites

http://www.adminia.ru/cisco-privilege-nastroyka-privilegiy-polzovatelya-cisco/

 


privilege mode [all] level level command

privilege – команда для задания уровня привилегий команд
mode – режим конфигурации (EXEC, interface, line ит.д.)
all – означает возможность выполнения всех команд начинающихся на «command»
level – уровень привилегий
command – выполнение какой команды разрешено на уровне привилегий level

Share this post


Link to post
Share on other sites

Ещё один вопрос по привилегиям.

Прошивка на ASR стоит

sh ver
Cisco IOS XE Software, Version 16.09.04

 

Делаю юзера с ограниченными правами.

username xxxx view yyyy secret 5 zzz1

Делаю view

 

parser view remoteOperator
 secret 5 zzz2

  commands ip-subscriber include initiator dhcp
 commands ip-subscriber include initiator
 commands policymap-service-classmap include police
 commands interface include ip subscriber
 commands interface include service-policy
 commands interface include shutdown
 commands interface include ip policy
 commands interface include ip helper-address
 commands interface include ip unnumbered
 commands interface include all ip address
 commands interface include ip dhcp relay information policy-action
 commands interface include ip dhcp relay information option-insert
 commands interface include ip dhcp relay information
 commands interface include ip dhcp relay
 commands interface include ip dhcp
 commands interface include ip
 commands interface include encapsulation dot1Q
 commands interface include encapsulation
 commands interface include description
 commands configure include ip access-list standard
 commands configure include ip route
 commands configure include ip access-list
 commands configure include all interface
 commands configure include policy-map
 commands configure include ip
 commands exec include write memory
 commands exec include write
 commands exec include configure terminal
 commands exec include configure
 commands exec include show snmp mib ifmib ifindex
 commands exec include show snmp mib ifmib
 commands exec include show snmp mib
 commands exec include show snmp
 commands exec include all show running-config
 commands exec include show
 commands exec include clear subscriber session username
 commands exec include clear subscriber session
 commands exec include clear subscriber
 commands exec include clear ip
 commands exec include clear

 

Получается странная вещь

Вроде машинка даёт привилегии, потому что я авторизуюсь под ограниченным пользователем, и вижу команду show running-config, и могу её вызывать, но результат пустой.

 

А когда пытаюсь сохранить конфиг

5>wr memory
startup-config file open failed (Permission denied)

 

 

 

В какую сторону копать? Хотя бы какой тип дебага можно включить, чтобы отследить "косяки" с правами доступа?

 

 

Share this post


Link to post
Share on other sites

Вы не сможете дать пользователю не имеющему полных прав сохранить конфиг.

Share this post


Link to post
Share on other sites

А show running-config для ограниченного пользователя?

На другом ASR, где была прошивка 15.4(3)S, работало с теми же привилегиями

Share this post


Link to post
Share on other sites

Версия IOS XE какая? Если нужны привилегии на чтение конфига, то, во-первых, надо юзать не 'show running-configuration', а 'show running-configuration view full', а во-вторых(и это самое важное) - нужно дать права на чтение/запись файлов соответствующему уровню привилегий командой 'file privilege <level>'(в глобальном режиме configure, не во view). Это в новых IOS XE(16.*). В старых(в 3.16.* точно, насчет 3.17.* не уверен) команды file нет - там и без нее работает с 'view full'.

Share this post


Link to post
Share on other sites

Спасибо за ответ! Версия 16.09.04.

Я правильно понимаю, что если не указать  'file privilege <level>' , то ASR молча, без ругани, проглотит команду show running-configuration view full и ничего не выдаст?

 

 

upd. Проверил, работает, спасибо!

Edited by burevestnik_1983

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now