5 Replies Latest reply on Jun 27, 2012 3:52 PM by Steve Welsh

    Master SSH password?

    rvalenzuela

      Hello, Is there a way I can set a Master password for ALL the devices I manage with Kiwi?

      I have about 115 device and for new security policy's we need to change or Radius password every 3 month and so I have to chance the password for all the 115 device one by one.

      If there a way I can changed all of the at the same time or establish a master password?

       

      Thankz!!

        • Re: Master SSH password?
          Steve Welsh

          Hi,

           

          You should be able to do this via the CatTools API

           

          You'd need to create a script similar to the one documented in the Devices class Sample Code and within the 'For each Device in Devices ... Next' loop, replace with Device.AAAPassword = "Your new password" for RADIUS, AAA, or Local authentication; else if you want to change the SSH password then substitute with Device.SSHPassword = "Your new password".

           

          A full list of device properties can be found in the on-line help file in the Device class.

           

          Hope this helps!

           

          Regards,

           

          Steve

          1 of 1 people found this helpful
            • Re: Master SSH password?
              rvalenzuela

              Thanks for the reply!

              It will be enough if i use a VBScript and run it? (from desktop)

               

              *****************************************************************

              Dim Devices As CatToolsAPI.Devices

              Dim Device As CatToolsAPI.Device

               

              //since I'm using a text editor.

              Dim DB

              Set DB = CreateObject("CatToolsAPI.Database")

              DB.OpenConnection

               

              If DB.Connected Then

                 Set Devices = DB.Devices

               

                 For Each Device In Devices

                    If Device.Group = "Default" then

                       Device.SSHPassword = "MyNew$$H_Passw0rd".

                    End If

                    DoEvents

                 Next

              Else

              Debug.Print "Connection failed: " & DB.ErrDescription

              End If

               

              //close connection

              DB.CloseConnection

               

              Set Device = Nothing

              Set Devices = Nothing

              Set DB = Nothing

              *****************************************************************

              Thanks!!

                • Re: Master SSH password?
                  Steve Welsh

                  Yes you should be able to run a VBScript from the desktop.

                  Just save the script file as a .vbs extension.

                   

                  Below should work as a vbs.  It will pop a message box if the DB connection fails.

                   

                  *****************************************************************

                  Dim DB

                  Dim Devices

                   

                  Set DB = CreateObject("CatToolsAPI.Database")

                   

                  DB.OpenConnection

                  If DB.Connected Then

                       Set Devices = DB.Devices

                       For Each dv In Devices

                            If dv.Group = "Default" then

                                 dv.SSHPassword = "MyNew$$H_Passw0rd"

                                 DB.Devices.SaveDevice(dv)

                            End If

                       Next

                       DB.CloseConnection

                  Else

                       msgbox "DB Connection failed"

                  End If

                   

                  Set Devices = Nothing

                  Set DB = Nothing

                  *****************************************************************

                    • Re: Master SSH password?
                      rvalenzuela

                      Works great!!! thankz a lot!!!

                        • Re: Master SSH password?
                          Steve Welsh

                          You are welcome.  Glad to have helped.

                          Just one last note; I based this on the code sample you provided which appeared to specifically only perform the operation on the device group called 'Default'.

                           

                          If you need to perform the operation on devices in other groups, change the text "Default" in the code line shown below to the relevant group.

                               If dv.Group = "Default" then

                           

                          Alternatively if you want to perform the operation on the whole device list regardless of group, then remove this line of code (and its related 'End if' a couple of lines below it).

                           

                          Steve