09-07-2021 03:56 AM
I'm looking for a solution to enable a script for clients (local admins) to run some scripts on the switches/routers.
They can enable it by running the guestshell command. But, how can I configure an alias?
So that one 'keyword' enables the script.
Thank you
Solved! Go to Solution.
09-08-2021 12:00 AM
Almost, thx for the help, but found a solution. How I searched for it in google changed the results and I found a config/
OSW-9300-BL(config)#alias exec ZEROSWITCH guestshell run python /flash/updateswitch.py
OSW-9300-BL(config)#end
OSW-9300-BL#ZEROSWITCH
####---- Welcome to the SW Script - Python - -------------------------------------###
####---- Baseline is OK ---------------------------------------------------------###
==========================================================================================
[(1, 'Change Switch Name - Site Config'),
(2, 'Zeroize the switch config'),
(9, 'Exit the program')]
==========================================================================================
What do you like to d...............
09-07-2021 04:22 AM
Hi,
On nexus switches you can simply use alias command:
switch(config)# cli alias name <alias-command> <real command>
Stay safe,
Sergiu
09-07-2021 04:35 AM
it is a 9300 series switch ios xe , and the above command failed
09-07-2021 05:03 AM
@_|brt.drml|_ totally guessing here - Create an EEM applet, which can actually run a Python script. Create the alias to run/exec something like
guestshell run python3 /home/guestshell/setup.py
09-08-2021 12:00 AM
Almost, thx for the help, but found a solution. How I searched for it in google changed the results and I found a config/
OSW-9300-BL(config)#alias exec ZEROSWITCH guestshell run python /flash/updateswitch.py
OSW-9300-BL(config)#end
OSW-9300-BL#ZEROSWITCH
####---- Welcome to the SW Script - Python - -------------------------------------###
####---- Baseline is OK ---------------------------------------------------------###
==========================================================================================
[(1, 'Change Switch Name - Site Config'),
(2, 'Zeroize the switch config'),
(9, 'Exit the program')]
==========================================================================================
What do you like to d...............
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide