FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


fhscripts:check:check_loginpass.exp.html



Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
fhscripts:check:check_loginpass.exp.html [2017/11/06 01:13]
kurihara ↷ Page name changed from scripts:passwrodcheck.html to scripts:login-check.html
fhscripts:check:check_loginpass.exp.html [2018/02/26 00:37]
kurihara
Line 1: Line 1:
-====== expect : login check ======+[[:index.html#FastHandle Scripts|FastHandle Scripts]] 
 +====== Expect to Check Login Passowrd  with one-line ======
  
 +$FHHOME/fhscripts/check_loginpass.exp
 +
 +\\
 +{{INLINETOC}}
 +\\
 +
 +===== check_loginpass.exp =====
 +$FHHOME/fhscripts/check_loginpass.exp
 +
 +<sxh bash toolbar:false gutter:false>
 +#!/usr/bin/expect
 +#########################################################
 +#./check_loginpass.exp  $IP $USER '$PASS'
 +#
 +#########################################################
 +
 +set IP  [lindex $argv 0]
 +set USER [lindex $argv 1]
 +set PASS [lindex $argv 2]
 +
 +
 +spawn ssh $USER@$IP
 +
 +expect "password: "
 +send "$PASS\r"
 +
 +expect "$ "
 +send "LANG=C date\r"
 +
 +expect "$ "
 +send "exit\r"
 +
 +
 +exit 0
 +</sxh>
 +
 +
 +\\
 +\\
 +<WRAP box 90%>
 +<catlist ..: -noAddPageButton -smallHead -sortAscending  -sortAscending>
 +</WRAP>
 +
 +\\
 +\\
 +[[:index.html#FastHandle Scripts|FastHandle Scripts]]


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