FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


fhscripts:check:check_rootpass.exp.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
fhscripts:check:check_rootpass.exp.html [2017/11/25 00:45]
kurihara ↷ Page moved from scripts:passwd-check-root.html to fhscripts:passwd-check-root.html
fhscripts:check:check_rootpass.exp.html [2018/02/26 00:37]
kurihara
Line 1: Line 1:
 [[:index.html#FastHandle Scripts|FastHandle Scripts]] [[:index.html#FastHandle Scripts|FastHandle Scripts]]
-====== check_rootpass.exp ======+====== Expect to Check Root Passowrd  after logging as a general user ======
  
 +$FHHOME/fhscripts/check_rootpass.exp
  
 +\\
 +{{INLINETOC}}
 +\\
 +
 +===== How to use check_rootpass.exp=====
 +<sxh bash toolbar:false gutter:false>
 +$ check_rootpass.exp  192.168.0.10  'PASSWORD'
 +</sxh>
 +
 +
 +
 +\\
 +===== check_rootpass.exp =====
 +$FHHOME/fhscripts/check_rootpass.exp
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 #!/usr/bin/expect #!/usr/bin/expect
Line 12: Line 27:
 set IP  [lindex $argv 0] set IP  [lindex $argv 0]
 set ROOTPASS [lindex $argv 1] set ROOTPASS [lindex $argv 1]
-set INFRAPASS PASSWORD+set LOGINPASS PASSWORD
  
  
Line 18: Line 33:
  
 expect "password: " expect "password: "
-send "$INFRAPASS\r"+send "$LOGINPASS\r"
  
 expect "$ " expect "$ "
Line 40: Line 55:
 \\ \\
 <WRAP box 90%> <WRAP box 90%>
-<catlist -noAddPageButton -smallHead -sortAscending>+<catlist ..: -noAddPageButton -smallHead -sortAscending>
 </WRAP> </WRAP>
  


fhscripts/check/check_rootpass.exp.html.txt · Last modified: 2018/03/29 00:05 by kurihara