FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

fhscripts:check:check_rootpass.exp.html



This is an old revision of the document!


FastHandle Scripts

check_rootpass.exp

#!/usr/bin/expect
#########################################################
#./check_rootpass.exp  $IP '$ROOTPASS'
#
#########################################################

set IP  [lindex $argv 0]
set ROOTPASS [lindex $argv 1]
set INFRAPASS PASSWORD


spawn ssh user01@$IP

expect "password: "
send "$INFRAPASS\r"

expect "$ "
send "LANG=C su -\r"

expect "assword: "
#sleep 1
send "$ROOTPASS\r"

expect "# "
send "exit\r"

expect "$ "
send "exit\r"

interact








FastHandle Scripts



fhscripts/check/check_rootpass.exp.html.1511538330.txt.gz ยท Last modified: 2017/11/25 00:45 by kurihara