failsafe account configuration script
						
					
					
				
			
		
	
			
	
	
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-15-2018 11:24 AM
			
				
					
					
						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
		
		
	
	
	
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
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-16-2018 03:01 PM
			
				
					
					
						Hi
See below. This is a Oneview script not a Netsite command script.
#@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-accountconfigure failsafe-account
CLI user
CLI password
CLI password
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
		
		
	
	
	
See below. This is a Oneview script not a Netsite command script.
#@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-accountconfigure failsafe-account
CLI user
CLI password
CLI password
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
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-16-2018 03:01 PM
			
				
					
					
						I actually tried the simple version above myself and it worked.   What did your script look like (password omitted of course)?
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-16-2018 03:01 PM
			
				
					
					
						Thanks for that, it still hangs.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-16-2018 11:15 AM
			
				
					
					
						So i get the below debug error, which sort off indicates I am missing something.
2018-02-15 14:03:36,919 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceCliSession] 192.168.5.15|Completed Command|config failsafe-account permit all|
2018-02-15 14:03:36,920 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.scriptInterpreter.ExecuteCLICommand] timeout for cli [CLI config failsafe-account] 55 seconds.
2018-02-15 14:03:36,920 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceCliSession] 192.168.5.15|Processing Command|config failsafe-account|
2018-02-15 14:03:39,245 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=2] Found: 386
2018-02-15 14:03:43,433 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=2] Found: 386
2018-02-15 14:03:46,976 ERROR [com.extremenetworks.ScriptingEngine] | 192.168.5.15 : Error: Timeout waiting for cli response
2018-02-15 14:03:46,978 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorManagerBean] Error||Exception
tcl.lang.TclException: Error: Timeout waiting for cli response
		
		
	
	
	
2018-02-15 14:03:36,919 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceCliSession] 192.168.5.15|Completed Command|config failsafe-account permit all|
2018-02-15 14:03:36,920 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.scriptInterpreter.ExecuteCLICommand] timeout for cli [CLI config failsafe-account] 55 seconds.
2018-02-15 14:03:36,920 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceCliSession] 192.168.5.15|Processing Command|config failsafe-account|
2018-02-15 14:03:39,245 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=2] Found: 386
2018-02-15 14:03:43,433 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=2] Found: 386
2018-02-15 14:03:46,976 ERROR [com.extremenetworks.ScriptingEngine] | 192.168.5.15 : Error: Timeout waiting for cli response
2018-02-15 14:03:46,978 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorManagerBean] Error||Exception
tcl.lang.TclException: Error: Timeout waiting for cli response
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎02-15-2018 12:40 PM
			
				
					
					
						Try to add: enable cli scripting at the begining