-   Fedora (
-   -   add several users - fedora C4 (

xchido 02-06-2006 11:15 AM

add several users - fedora C4
I have a fedora core 4 with squirrelmail.

Is there a way to add several users so they can use ftp and squirrelmail (webmail) or do I have to add one by one.

Also, I am looking for a nicer GUI for the squirrelmail webmail user interface.

Any help will be greatly appreciated

HelaWann 02-07-2006 08:41 AM

This depends on the number of users you want to add. If there are 10 - 20 users, the "by hand" sollution ist acceptable. Everything above would need a script and a "database" (csv-file).


username;password in clear-text;homedir;Mailaddress;all other things you need
For a pure-ftpd with ab puredb-database for user authentication it will fit. This will be no a fine thing, but if you only use it for one time, you could use a script like this:



for row in `cat <csv-file>`
  NAME=`echo $row | cut -f1 -d";"`
  # Do here anything you need
  pure-pw useradd $NAME -d $HOMEDIR -g $GID -u $UID -m << EOF
  if [ "$?" -eq 0 ]
    echo "User $NAME addes successfully."
    echo "Error adding user $NAME."

I do not know your webmail-programm to add users, but this should work fine.

Hope this helps!


All times are GMT -5. The time now is 06:50 PM.