This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Automated user management with Expect

Posted by: Anonymous [ip:] on September 26, 2007 11:24 AM
Not that it distracts from the usefulness of the article, but in case you use smbpasswd, couldn't you have used the -s option of smbpasswd? Then expect wouldn't be necessary:

-s This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from /dev/tty (like the passwd(1) program does). This option is to aid people writing scripts to drive smbpasswd.


Return to Automated user management with Expect