- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- expect scripting error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 01:00 PM
11-27-2003 01:00 PM
expect scripting error
login it writes to a file to be mailed to me later....
I have the set variables at the beginning...
set LOG_FILE /home/c/logs/pass_set.log
set FILE [open /home/c/scripts/problem_list.txt "r"]
set ERROR_FILE /home/c/logs/connect_errors1.txt
set ERROR [ open $ERROR_FILE "w"]
set LOGIN_ERROR_FILE /home/c/logs/failed_logins1.txt
set PASS_ERROR_FILE /home/c/logs/passwd_change_error1.txt
set PASS_ERROR [ open $PASS_ERROR_FILE "w"]
set MAILTO someone@work.com
set SUBJECT_CONNECT "Failed Connections for acc account on [exec date]"
set SUBJECT_PASSWD "Failed Passwd Changes for acc account on [exec date]"
puts $ERROR "**** FAILED Connections ERROR LOG for [exec date] **** \n"
puts $PASS_ERROR "**** FAILED Passwd Changes ERROR LOG for [exec date] ****
\n"
####################################
I then start the script that source a file of IPs, and logs in, this is
where I need to get the error of
Invalid user name or password.
Here is chunks of the script...
####################################
proc acc_login {} {
send -- "acc1\r"
expect "Enter Password\r\n>$"
send -- "*************\r"
expect -exact "************\r"
expect "Invalid user name or password.\*$"
{
puts $PASS_ERROR "$LINE, Invalid user name or passwd, passwd was
not changed."; continue
}
}
#####################################################
This is the error when I run the script...
Enter User Name
>acc1
Enter Password
>************
Invalid user name or password.
Enter User Name
>invalid command name "
puts $PASS_ERROR "$LINE, Invalid user name or passwd, passwd was
not changed."; continue
"
while executing
"{
puts $PASS_ERROR "$LINE, Invalid user name or passwd, passwd was
not changed."; continue
}"
(procedure "acc_login" line 7)
invoked from within
"acc_login "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 01:39 PM
11-27-2003 01:39 PM
Re: expect scripting error
The line-wrapping etc. makes it 'difficult' to be sure what the original says.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2003 09:35 PM
11-28-2003 09:35 PM
Re: expect scripting error
I dont know this language but I wonder, if continue shouldnt be exp_continue?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 04:29 AM
12-01-2003 04:29 AM
Re: expect scripting error
man autoexpect for more details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 06:33 AM
12-01-2003 06:33 AM