SMS - User password change template

Vendor: Huawei
Product: Messaging consolidation_sms
Executor: SSH

# Defina idioma inglês
expect "*>"
exec "export LC_ALL=C"

# limpa sessão sudo
expect "*>"
exec "sudo -k"

#Executa o comando passwd no shell com sudo
expect "*>"
exec "sudo passwd [#USERNAME#]"

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

#Repete a nova senha
expect "*password:"
exec "[#NEW_PASSWORD#]"

#Confirma atualização
expect "*changed"

#Sai do equipamento
expect "*>"
exec "exit"

end