[LCP]how to give passwd in a script?

Anandakumar.Thangaraju at EchoMail.com Anandakumar.Thangaraju at EchoMail.com
Thu May 9 09:06:05 UTC 2002


Can anyone pls tell me how to give passwd in a script.

I want to create 100 mail accounts.
For this i created a simple bash script.
 The usersdd is working fine.
 I don't know how to give the the passwords from the script .
The script is as follows


#! /bin/bash

index=100

for((a=1; a<=100; a++))
do
useradd "test$a"
passwd "test$a"
// i know the following is wrong, what is the correct one?
test$a
test$a
done

Thanks & Regards,
Anand.T.





More information about the linuxCprogramming mailing list