Easiest is: $ echo password > file.txt $ saslpasswd user1 < file.txt Otherwise you need to use expect.
Thanks! -- Pol