Hello There,
I'm trying to write a script to reset every night the password of a specific pureFTP user.
To do so, I'm using expect:
Code:
#!/usr/bin/expect
set user [lindex $argv 0]
set pass [lindex $argv 1]
spawn pure-pw passwd $user -m
expect "Password:"
send -- "$pass\n"
expect "Enter it again:"
send -- "$pass\n"
spawn pure-pw mkdb
So when I type
./reset_password user password the script run well but the password is not reset. If I type these command manually it works fine.
Any idea of what can be the issue?
Best regards,
Angel.