Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-04-2016, 08:55 AM
kraftr kraftr is offline
Registered User
 
Join Date: Aug 2016
Posts: 2
Script Send Password failed

Hello,

I'm writing a script to automatically change passwords on Hirschmann Switches, but to send the old Password fails. The connect via telnet is working.

Script:
crt.Screen.Send "users passwd user" & vbCr
crt.Screen.WaitForString "Enter old password:"
crt.Screen.Send oldPass & vbCr
crt.Screen.WaitForString "Enter new password:"
crt.Screen.Send newPass & vbCr
crt.Screen.WaitForString "Confirm new password:"
crt.Screen.Send newPass & vbCr

Logfile:
(K2_EB_SW001) >en
(K2_EB_SW001) #conf
(K2_EB_SW001) (Config)#users passwd user
Enter old password:***
Incorrect Password!
(K2_EB_SW001) (Config)#Exit

The old Password has 5 Digits but only 3 "*" are in the logfile.
Reply With Quote
  #2  
Old 08-04-2016, 10:02 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,548
Hi kraftr,

I do not see a synchronous statement in your script.

As described in our VB scripting manual here (section 4.2, specifically Avoid "Missing" Data with Screen.Synchronous = True), using synchronous is the key to avoiding missing data coming from the remote.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 08-05-2016, 03:17 AM
kraftr kraftr is offline
Registered User
 
Join Date: Aug 2016
Posts: 2
Hi Brenda,

Thank you for your reply, but the "Screen.Synchronous = True" statement is in the script. I have tested "crt.Sleep" commands, but without success.

In the putty-Logfile I don't see anything wrong.
Reply With Quote
  #4  
Old 08-05-2016, 09:11 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,548
Hi kraftr,

I will need to see a copy of the complete script, with sensitive data redacted.

When redacting, please leave an equal number of redaction characters (ie: 192.0.0.1 becomes ###.#.#.#).

Please send it to support@vandyke.com and reference "Attn Brenda - Forum Thread #12428".
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:40 AM.