vOTA- User password change template

Vendor: Gemalto
Product: vOTA
Executor: SSH

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

# Definir linguagem como inglês
expect-regex "/[#$>]/"
exec "export LC_ALL=C"

# Executa passwd
expect-regex "/[#$>]/"
exec "sudo passwd [#USERNAME#]"

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

# Confirmação senha
expect "*password:"
exec "[#NEW_PASSWORD#]"

# Valida resultado
expect "*updated successfully"
expect-regex "/[#$>]/"

# Sai e termina script
exec "exit"
end