Thanks. I'll try that. What type of encryption should I use? John
Eric wrote: > If you run > # /home/vpopmail/bin/vadduser > you'll see the various options. > > Looks like you need to use the -e flag with a password. This lets > you specify a standard_encrypted_password. > > John, you'll need to have encrypted passwords to use this option. > > John Hansen wrote: > > Hi PakOgah, > > > > Thanks for modifying the script. However, when I run the script, it asks to > > "Please enter password" for each user, then asks to re-enter the password > > for > > confirmation, before going onto the next user. A step in the right > > direction, > > but still would like to have the passwords added within the script. > > > > So, still looking for the part where the users password is entered by the > > script and not manually. > > > > Thanks, > > > > John > > > > > > > > ---------- Original Message ----------- > > From: PakOgah <[email protected]> > > To: John Hansen <[email protected]>, > > [email protected] > > Sent: Fri, 31 Jul 2009 11:38:32 +0700 > > Subject: Re: Bulk user import script > > > >> Halo John, > >> I am replied to qmailtoaster list so everyone can also use it as > >> reference for future use or correct me If I am making an error. > >> In your case, I have modified the script into below > >> =============================== > >> #!/bin/sh > >> # > >> # BULK USER ADDING FOR QMAIL TOASTER > >> # > >> # Created after I ran into an issue of creating 20,000 users on my toaster! > >> # Initial ideas come from a script that PakOgah "[email protected]" > >> # helped me with. > >> # Still very manual, but Work in Progress > >> # > >> # Suggestions to [email protected] > >> # > >> # Change a few variables and you are good to go > >> # > >> # > >> # Location of the users file > >> # Rememeber that the users file is in the format > >> # Firstname Lastname Username Password > >> USERS_FILE="/path/to/file.txt" > >> # The mail domain to which users are created > >> # > >> MAILDOMAIN="@domain.com" > >> # the vadduser command > >> QMAILADD="/home/vpopmail/bin/vadduser" > >> # Select a default password for all users > >> #PASS="mypass" > >> #Specify the Default Quota_in_bytes for your Users > >> # 10 MB = 10 x 1024 x 1024 > >> QUOTA="10485760" > >> #Fun starts here No more variables to change below this line > >> cat ${USERS_FILE} | \ > >> while read FIRSTNAME LASTNAME USERNAME PASSWORD > >> do > >> echo "adding the user: $USERNAME" > >> $QMAILADD -q $QUOTA -c "$FIRSTNAME $LASTNAME" > >> $USERNAME$MAILDOMAIN $PASSWORD > >> done > >> # > >> =============================== > >> > >> John Hansen wrote: > >>> Hi, > >>> > >>> I'm looking at using this script for a bulk user import, but the users > >>> have > >>> passwords all ready, so I don't want to use the same default password for > >>> everyone. What changes would I need in the script so I can use it with a > >>> separate password for each user? > >>> > >>> I was thinking the format for the users file could just include the extra line > >>> for the password. > >>> Firstname Lastname Username Password > >>> > >>> > >>> #!/bin/sh > >>> # > >>> # BULK USER ADDING FOR QMAIL TOASTER > >>> # > >>> # Created after I ran into an issue of creating 20,000 users on my > >>> toaster! > >>> # Initial ideas come from a script that PakOgah "[email protected]" > >>> # helped me with. > >>> # Still very manual, but Work in Progress > >>> # > >>> # Suggestions to [email protected] > >>> # > >>> # Change a few variables and you are good to go > >>> # > >>> # > >>> # Location of the users file > >>> # Rememeber that the users file is in the format > >>> # Firstname Lastname Username > >>> USERS_FILE="/path/to/file.txt" > >>> # The mail domain to which users are created > >>> # > >>> MAILDOMAIN="@domain.com" > >>> # the vadduser command > >>> QMAILADD="/home/vpopmail/bin/vadduser" > >>> # Select a default password for all users > >>> PASS="mypass" > >>> #Specify the Default Quota_in_bytes for your Users > >>> # 10 MB = 10 x 1024 x 1024 > >>> QUOTA="10485760" > >>> #Fun starts here No more variables to change below this line > >>> cat ${USERS_FILE} | \ > >>> while read FIRSTNAME LASTNAME USERNAME > >>> do > >>> echo "adding the user: $USERNAME" > >>> $QMAILADD -q $QUOTA -c "$FIRSTNAME $LASTNAME" $USERNAME$MAILDOMAIN > > $PASS > >>> done > >>> # > >>> > >>> Thanks, > >>> > >>> John > >>> > >>> > >>> > >> -- > >> This message has been scanned for viruses and > >> dangerous content by the Cotter Technology > >> Department, and is believed to be clean. > > ------- End of Original Message ------- > > > > > > -- > -Eric 'shubes' > > --------------------------------------------------------------------------------- > Qmailtoaster is sponsored by Vickers Consulting Group > (www.vickersconsulting.com) Vickers Consulting Group offers > Qmailtoaster support and installations. If you need > professional help with your setup, contact them today! > --------------------------------------------------------------------------------- > Please visit qmailtoaster.com for the latest news, updates, and > packages. > > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- > This message has been scanned for viruses and > dangerous content by the Cotter Technology > Department, and is believed to be clean. ------- End of Original Message ------- -- This message has been scanned for viruses and dangerous content by the Cotter Technology Department, and is believed to be clean. --------------------------------------------------------------------------------- Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! --------------------------------------------------------------------------------- Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
