LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-06-2006, 12:15 PM   #1
xchido
LQ Newbie
 
Registered: Jul 2005
Posts: 22

Rep: Reputation: 15
Question 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
 
Old 02-07-2006, 09:41 AM   #2
HelaWann
LQ Newbie
 
Registered: Nov 2005
Posts: 6

Rep: Reputation: 0
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).

Code:
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:

Code:
#!/bin/bash

for row in `cat <csv-file>` 
do
  NAME=`echo $row | cut -f1 -d";"`
  # Do here anything you need
  pure-pw useradd $NAME -d $HOMEDIR -g $GID -u $UID -m << EOF
$PASSWORD
$PASSWORD
EOF
  if [ "$?" -eq 0 ]
  then
    echo "User $NAME addes successfully."
  else
    echo "Error adding user $NAME."
  fi
done
I do not know your webmail-programm to add users, but this should work fine.

Hope this helps!

Hela
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 08:34 AM
I can't add users to "samba users" in control center g_jakes Linux - Security 3 05-20-2005 03:10 PM
can't add users to "samba users" in control center g_jakes Linux - Networking 1 05-20-2005 02:28 PM
can't add users to "samba users" in control center g_jakes Linux - Wireless Networking 1 05-20-2005 02:27 PM
cant add users...?? Help AmdMhz Linux - Software 9 02-01-2004 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration