NE40 Huawei - Own user password change template

Vendor: Huawei
Product: NE40
Executor: SSH

set-ssh-version 2
set-new-line-mode "unix"
set-connect-timeout 10
set-read-timeout 10

expect "*>"
exec "system-view"

expect "*]"
exec "aaa"

expect "*aaa]"
exec "local-user [#USERNAME#] password irreversible-cipher [#NEW_PASSWORD#]"

expect "Please enter old password:"
exec "[#CURRENT_PASSWORD#]"

expect "*aaa]"
exec "quit"

expect "*]"
exec "quit"

expect "*>"
exec "save"

expect "*Are you sure to continue?*"
exec "Y"

expect "*Save the configuration successfully.*"
exec ""

end