cancel
Showing results for 
Search instead for 
Did you mean: 

failsafe account configuration script

failsafe account configuration script

Justsomebodi
New Contributor III
Hi Guys

I have the below script which is suppose to set the failsafe and admin account passwords. It however just hangs at the first line; Disable clipaging

#@MetaDataStart
#@DetailDescriptionStart
#############################################################################################
# Define your user parameters in this section. For reference, see bundled scripts.
##############################################################################################
#@DetailDescriptionEnd
#@MetaDataEnd
#Enter all CLI commands from here
disable clipaging
#Set failsafe-account
config failsafe-account
regexp {.*enter failsafe user name:.*} ${CLI.OUT} foundfailsafe1
IF ([info exists foundfailsafe1]) THEN
CLI FailSafeAccount
ENDIF
regexp {.*enter failsafe password:.*} ${CLI.OUT} foundfailsafe2
IF ([info exists foundfailsafe2]) THEN
CLI FailSafePassword
ENDIF
regexp {.*enter password again:.*} ${CLI.OUT} foundfailsafe3
IF ([info exists foundfailsafe3]) THEN
CLI FailSafePassword
ENDIF
configure failsafe-account permit all
#Configure Local Admin password
configure account "admin" password
regexp {.*Current user's password:.*} ${CLI.OUT} AdminAccount1
IF ([info exists AdminAccount1]) THEN
CLI Admin
ENDIF
regexp {.*New password:.*} ${CLI.OUT} AdminAccount2
IF ([info exists AdminAccount2]) THEN
CLI AdminPassword
ENDIF
regexp {.*Reenter password:.*} ${CLI.OUT} AdminAccount3
IF ([info exists AdminAccount3]) THEN
CLI AdminPassword
ENDIF
regexp {.*overwrite it?.*} ${CLI.OUT} foundit1
IF ([info exists foundit1]) THEN
CLI yes
ENDIF
save
regexp {.*overwrite it?.*} ${CLI.OUT} foundit2
IF ([info exists foundit2]) THEN
CLI yes
ENDIF

enable clipaging

so the question is, can this be scripted? Any ideas?

Thanks
10 REPLIES 10

Hi

Thanks for the reply. That didn't work.
GTM-P2G8KFN