On Oct 3, 2008, at 2:52 PM, Kyle Quillen wrote:

Yea i looked in there but the script below was all that I could find and that will just set the users passwords to a default pass how would I modify the script to look at the txt file for all the info?

well, if you populate the script in the format "Firstname Lastname Username Password", then you can change the while line to

while read FIRSTNAME LASTNAME USERNAME PASS

and it'll do what you want.

-steve

#!/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
#







-----Original Message-----
From: news on behalf of Eric Shubert
Sent: Fri 10/3/2008 12:07 PM
To: qmailtoaster-list@qmailtoaster.com
Subject:  Re: [qmailtoaster] import a list of users

Kyle Quillen wrote:

All,

I have  a listing of roughly 900 emails that I have to import to a
toaster. I already have the server up and running and I have the list in a comma seperated txt file but how do I do a bulk add of the users.

Thanks
Q


Have you forgotten the wiki? ;)

--
-Eric 'shubes'


---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


< winmail .dat >---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to