ATX-250 Опубликовано 7 июля, 2022 · Жалоба Здравствуйте! Подскажите, как можно разграничить уровни доступа на коммутаторы S2985G? Создаю enable password level 1 7 password Пользователи по radius авторизуются и получают уровень доступа 1. А вот как им прописать разрешенные команды? Пробую что-то вроде: privilege interface-ether level 1 switchport ... ... ... - коммутатор говорит Illegal command :switchport ... ... ... (точки это разные доп слова типа mode, access, vlan) Пока получилось добавить только вот эти две: privilege interface-ether level 1 shutdown и privilege interface-ether level 1 no shutdown. Но пользователю до них не добраться, так как он не может перейти в режим конфигурации. Как мне добавить пользователю доступ к режиму конфигурации и только к секции interfaces ? А ещё не могу удалить команды: privilege exec level 1 all privilege config level 1 all privilege interface-ether level 1 all Делаю no - и на каждую из них выдаёт: Illegal command :all SNR-S2985G-48T Device SoftWare Version 7.0.3.5(R0241.0519) BootRom Version 7.2.40 Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Evgeny Mirhasanov Опубликовано 7 июля, 2022 · Жалоба @ATX-250 Добрый день, такая возможность есть. Приведу пример настройки некоторых фич. Создадим двух пользователей с разными привилегиями и разграничим их права: switch(config)#username test1 privilege 1 password test1 switch(config)#username test5 privilege 5 password test5 switch(config)#privilege config level 15 all switch(config)#privilege interface-ether level 15 all switch(config)#privilege exec level 5 config switch(config)#privilege config level 5 interface ethernet 1/0/1 switch(config)#privilege interface-ether level 5 no shutdown switch(config)#privilege interface-ether level 5 shutdown switch(config)#privilege exec level 1 show run switch(config)#privilege exec level 1 show ver Установим пароль на admin режим, дающий привилегию 15: switch(config)#enable password sUpEr-AdMiN++ Проверим права пользователя с привилегией 1: switch>sh privilege Current privilege level is 1 switch>show ver | i SoftWare SoftWare Package Version 7.5.3.2(R0004.0377) switch>show run | i sysLocation sysLocation Building 57/2,Predelnaya st, Ekaterinburg, Russia switch>conf ^ % Invalid input detected at '^' marker. Проверим права пользователя с привилегией 5: switch>conf switch(config)>? Configure commands: show Show running system information end End current mode and change to EXEC mode exit End current mode and down to previous mode help Description of the interactive help system interface Select an interface to configure switch(config)>interface ethernet 1/0/5 switch(config-if-ethernet1/0/5)>? commands: show Show running system information end End current mode and change to EXEC mode exit End current mode and down to previous mode help Description of the interactive help system no Negate a command or set its defaults shutdown Shutdown the selected interface Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
ATX-250 Опубликовано 8 июля, 2022 (изменено) · Жалоба Здравствуйте! Просто скопировал ваши команды, проверяю: username test5 privilege 5 password 7 e3d704f3542b44a621ebed70dc0efe13 privilege config level 1 interface ethernet all privilege exec level 5 config privilege config level 5 interface ethernet 1/0/1 privilege interface-ether level 5 no shutdown privilege interface-ether level 5 shutdown >show pri Current privilege level is 5 (config)>? Configure commands: show Show running system information aaa Configure AAA(Authentication, Authorization and pre-Accounting) aaa-accounting Accounting configurations access-list Add an access list entry accounting Accounting configuration commands am Configure AM anti-arpscan Anti-arpscan arp Arp authentication Authentication configuration commands authorization Authorization configuration commands banner Define a login banner bpdu-tunnel Bpdu-tunnel bpdu-tunnel-protocol Bpdu-tunnel captive-portal Enter captive portal mode. class-map Configure QoS Class Map clock Set clock cluster Cluster configuration commands cpu-rx-limitnotify cpu-rx-limitNotify cpu-rx-ratelimit CPU received traffic rate limit delete delete dns DNS dns-server Set a Nameserver to the DNS dosattack-check Dosattack dot1x Configure 802.1X dynamic-vlan Configure dynamic vlan enable Modify enable password parameters end End current mode and change to EXEC mode erps-ring Ethernet ring running G.8032 errp errp ethernet Ethernet exec-timeout Set timeout value exit End current mode and down to previous mode firewall Configure firewall status flowctrl-special set flowctrl ftp-server FTP Server config fulleaps FULL Ethernet Automatic Protection Switching garp Set GARP parameter gvrp Set GVRP parameter hardware-address-list Permit DHCP adding option 66 or 150 or 14x to the client in the hardware-address-list help Description of the interactive help system history Set history related parameters hostname Modify hostname interface Select an interface to configure ip IP information ipv6 IPv6 information isolate-port Isolate-port information key Authentication key management l2-address-table L2 address table setting l3-station-move Configure l3-station-move lacp Lacp configuration link-flap port link flap detection lldp Link Layer Discovery Protocol load-balance Load balancing method logging Logging login Enable password checking loopback-detection Loopback-detection mac-access-list Global MAC configuration subcommands_Named access-list mac-address Mac address config mac-address-learning Mac address-learning config mac-address-table MAC address table setting mac-authentication-bypass Configure MAC authentication bypass feature mac-ip-access-list Global MAC-IP configuration subcommands_Named access-list mac-vlan Configure mac vlan mls Configure MultiLayer Switching characteristics monitor Configure SPAN monitoring mrpp Multi-layer Ring Protection Protocol mtu Maximum Transmission Unit multicast Multicast config multicast-forwarding multicast-forwarding configure multicast-vlan Configure multicast vlan no Negate a command or set its defaults ntp Network time protocol ntp-service ntp-service password Assign the terminal connection password policy Policy policy-map Configure QoS Policy Map port-group Port-group configuration port-led port led port-rate-statistics port-rate-statistics port-redirect Port-redirect port-scan-mode Port-scan-mode pppoe PPPOE intermediate Agent privilege Set user privilege level profile-id Add an profile list entry protocol-vlan Configure protocol vlan radius Configure RADIUS radius-server Configure RADIUS server rmon Config rmon savi Source Address Validation Improvements service Modify use of network based services service-policy Configure QoS Service Policy set Set sflow Sflow Global Configuration show Show running system information snmp-server Modify SNMP parameters sntp Simple Network Time protocol spanning-tree Spanning-tree config ssh-server Ssh service config command storm-control Storm-control subnet-vlan Configure Subnet vlan sysContact sysContact sysLocation SysLocation tacacs-server Config tacacs+ server telnet-server Telnet server tftp-server TFTP Server config time-range Configure a time range transceiver-monitoring Transceiver monitoring uldp ULDP information ulpp Uplink Protection Protocol ulsm Uplink State Monitor userdefined-access-list Specify userdefined access list username Establish User Name Authentication userpassword Specifies the password for the user vacl Configure Vlan Acl vlan Vlan Commands vlan-port-redirect vlan-port-redirect vlan-trunk-range vlan-trunk-range vlan-trunking Vlan trunking voice-vlan Configure voice vlan web Config web Что я делаю не так? И я всё равно не могу удалить команды privilege exec level 1 all privilege config level 1 all privilege interface-ether level 1 all Там где слово all - не удаляются. Изменено 8 июля, 2022 пользователем ATX-250 Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Evgeny Mirhasanov Опубликовано 8 июля, 2022 · Жалоба @ATX-250 Вы не полностью скопировали команды: username test5 privilege 5 password 7 e3d704f3542b44a621ebed70dc0efe13 privilege config level 1 interface ethernet all privilege exec level 5 config privilege config level 5 interface ethernet 1/0/1 privilege interface-ether level 5 no shutdown privilege interface-ether level 5 shutdown Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
ATX-250 Опубликовано 8 июля, 2022 · Жалоба Но кто бы мог подумать, что для установки привилегий уровня 1 или 5 нужно задавать привилегии для уровня 15 :) Добавил эти команды:privilege config level 15 all и privilege interface-ether level 15 all и действительно, заработало. Спасибо большое! П.С. Было бы неплохо добавить это в документацию. Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Evgeny Mirhasanov Опубликовано 8 июля, 2022 · Жалоба @ATX-250 privilege config level 15 all и privilege interface-ether level 15 all Тут логика такая: вы "отбираете" все команды у 1-14, в пользу 15. Затем выдаете только лишь необходимые для 1-14. Запланируем написать заметку про это на nag.wiki Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...