you may use expect to enter the passwords
try man expect
manux
>> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said:
>>
>> >I run a small mail server for some schools that cannot afford their own and
>> >from time to time I get a list of new users who need accounts. I would like
>> >to automate this as much as possible on my box running RH 6.1.
>> >
>> >I was wondering if anyone knew of a script that would take a text file with
>> >something like:
>> > name1 pass1
>> > name2 pass2
>> > ... ...
>> >as a format and then just go through the list and run adduser against is with
>> >the proper tags? I am not much of a shell script hacker, and I have tried
>> >modifying a PERL script that I have just to crypt a list of
>> >username/passwords, but I am failing there as well.
>> >
>> >Any help would be much appreciated. I volunteer my time and when I get 50+
>> >names at a time it is a big time commitment, as I get the account request in
>> >the form of a spreadsheet it would be nice if I could put it to use. Thanks
>> >in advance.
>>
>
>If you're willing to do it in two passes, you can use useradd to create the
>account and details and chpasswd to give all the accounts passwords (feeding
>in either plain text or encrypted passwords).
>
>note if you are using MD5, chpasswd will only give you standard encryption.
>
>All you need is to export your spreadsheet into a text file, and using
>some basic scripting tools (eg cut/paste) and some editor work you can
>easily migrate the users from the spreadsheet into UNIX.
>
>[EMAIL PROTECTED]
>
>
>--
>To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
>as the Subject.
manux
[EMAIL PROTECTED]
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.