I'm in the process of setting up a script on a Linux box for someone that will automatically create users from a tab-delimited text file.
This script used to work find under Debian 1.2.x (i.e. before shadow passwords). I could just pass parameters to passwd and the users' password would be set. However, now, with shadow passwords, this doesn't work anymore. The new passwd won't allow me (as root) to set someone's password non-interectively. My first thought for a solution to this problem was to use expect to interact with passwd for me.... However, I've never used expect and after looking at the man page, I'm a little overwhelmed.... I'm hoping a quick response from someone familiar with expect can help me out... I know, I know about RTFM...... <grin> But this should be fairly simple for someone to provide in just a minute or two..... So please help if you can. The command is `passwd username` Then: Expect Send word: <passwd> word: <passwd> word: <passwd> And that's it. The only thing of interest here is that the third expect/send combination might not occur. It only happens if passwd doesn't "like" the password entered (too weak, short, long, etc.) So, there's gotta be some logic to handle this situation, I guess. Password security isn't terribly critical on this system. Thanks in advance, Kevin Traas Baan Business Systems Systems Analyst Langley, BC, Canada [EMAIL PROTECTED] (604) 882-8169 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .