Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Network Communication


    

Blue Forest http://www.lslnet.com at 12:08 on July 28, 2006


Add mail order firms in the next batch of users

See related FAQ Lane as qmail
[code] First method (garfy) :

A. Adduser.sh founding document in home catalog
Touch adduser.sh

B. Editor adduser.sh
Ee adduser.sh adding about :

While read line
Do
Echo $line
/home/vpopmail/bin/vadduser $line $line
Done "user

C. Creating user documentation and user input
Touch user
Ee user

11
22
33
D. Executive adduser.sh
. /adduser.sh

This document user input added to the tacit consent of the users on the domain, user names and passwords are the same.

The second method (gadfly) :

Code :

#!/bin/sh

#batchadduser.sh : Solvents add mail user.
#install Step.
#chmod U+x batchadduser
#./batchadduser.sh Domain datafile

$# -lt If [2]
Then
Echo "usage : $ 0 domain datafile"
Exit 1
Fi

Domain=$1
Datafile=$2
Addcmd=/home/vpopmail/bin/vadduser

While read username passwd
Do

$addcmd $username@$domain $passwd

Done "$datafile



The content of the document format
Username1 passwd
Username2 passwd2
............
Datafile content to preserve documents
Implementation
. /batchadduser.sh Localhost.com datafile
[/code]

I have used have the following questions :
The first method is not the importation of domain names, and read the echo $line $line results showed only one user;
The second method, if the echo $username@$domain $password, @ sign before the variable is shown, and suggested that the absence of the document, as well as documents and data paths in the script with a list, and correct capitalization.

Is how else?



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com