Created
September 12, 2017 22:30
-
-
Save itskenny0/8df55062b5d6cc6aa99f8aed4feb1b2d to your computer and use it in GitHub Desktop.
CommuniGate: Programmatically change account passwords from the shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
set username [lindex $argv 0] | |
set newpassword [lindex $argv 1] | |
spawn telnet 127.0.0.1 106 | |
expect "*ready*" | |
send "USER postmaster\r" | |
expect "300 please send the PASS" | |
send "PASS postmaster_password_here\r" | |
expect "200 login OK, proceed" | |
send "SETACCOUNTPASSWORD $username PASSWORD $newpassword\r" | |
expect "200 OK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment