cancel
Showing results for 
Search instead for 
Did you mean: 

We have 200+ switches, there is any script to change the password?

We have 200+ switches, there is any script to change the password?

Dineshkumar_Ram
New Contributor
We have 200+ switches, there is any script to change the password?
8 REPLIES 8

Drew_C
Valued Contributor III

Ed_Mannion
New Contributor II
I used the below to create a user on multiple x450 switches with OneView, but you'd have to delete the script after using it as password is stored in clear text. As previously stated expect would be a good option too. #@MetaDataStart ############################################################################################# # Define your user parameters in this section. For reference, see bundled scripts. ############################################################################################# #@MetaDataEnd # Enter all CLI commands from here ####################################################################### # Add System Accounts ####################################################################### ## Admin create account admin <> regexp {.*password:.*} ${CLI.OUT} foundit1 IF ([info exists foundit1]) THEN CLI <> ENDIF regexp {.*Reenter password:.*} ${CLI.OUT} foundit2 IF ([info exists foundit2]) THEN CLI <> ENDIF Ed.

Jarek
New Contributor II
Hello,

I think for users login/password you should configure TACACS+.
Switch login/password should be a last resort login when TACACS server is not available..

For password changing you can use telnet/netcat in bash.
Example:
echo "commands "| netcat -v -i 3 IP_Address 23 -T
(this means telnet to IP and enter each command with 3 sec. delay)

But for 200+ switches you should be careful....don't do this in one script.

--
Jarek

Matthew_Hum1
Extreme Employee
You can use the Command Script Execution tool within Netsight Console. Each line you type in will be just like you typed it in with telnet/ssh. So for example in EOS if I wanted to change the admin password to "password" I would type: set password password password exit (the blank space is for the old password)
GTM-P2G8KFN