Huawei E9000 - Own user password change template

Vendor: Huawei
Product: SSH E9000
Executor: SSH

set-connect-timeout 10
set-read-timeout 10
set-ssh-version 2

# Definir linguagem como inglês
expect "*#"
exec "export LC_ALL=C"

#Executa comando userpasswd
expect "*#"
exec "smmset -d userpasswd -v [#USERNAME#]"

#Senha da credencial de troca
expect "*passwd:"
exec "[#CURRENT_PASSWORD#]"

#Nova senha
expect "New password:"
exec "[#NEW_PASSWORD#]"

#Confirma nova senha
expect "*new password:"
exec "[#NEW_PASSWORD#]"

#Valida resultado
expect "Success"

# Sai e termina script
exec "exit"

end