Re: How To Auto Response so that I can add 100 users?
Daniel Ortiz <[email protected]> Wed, 30 Nov 2005 09:44:43 +0100
| Newsgroups | gmane.network.pureftpd.user |
|---|---|
| Message-ID | <[email protected]> |
Try with an script I've made:
#!/usr/bin/perl
use Crypt::PasswdMD5;
$user = $ARGV[0];
$password = $ARGV[1];
$home = $ARGV[2];
$uid = 1002;
if( $home =~ m#/$# ) {
chop($home);
}
$cryptedpassword = unix_md5_crypt($password);
$passfile = "/etc/pure-ftpd/pureftpd.passwd";
open(PASSFILE, "+>> $passfile");
$char = $user.":".$cryptedpassword.":".$uid.":".$uid."::".$home."/./::::::::::::\n";
print PASSFILE $char;
close(PASSFILE);
On Wed, Nov 30, 2005 at 03:45:12PM +0800, ???? wrote:
> I am trying to add VIRTUAL USERS to pure-ftpd by entering
> pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
> then system promote a msg
> Password:
> then
> Enter it again:
>
> if I want add 100 users it seems a lot trouble
>
> is there a way to auto response or a convenient way to add new user?
>
> Also I am new user please give some code thx.
>
> ---------------------------------------------------------------------
> To post a new message, e-mail: [email protected]
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
--
Daniel Ortiz
[email protected]
ILIMIT Comunicacions
Departament Sistemes
http://www.ilimit.es
Tel: (+34) 93 733 33 75
Fax: (+34) 93 733 32 43
signature.asc
(application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDjWZ7PprEQTARuLoRAp+DAJoCvCz/yekmbZnDzapP3rdAsSBoPwCgp2Fy eswILkqx9lY8M1NDOeGu0Pg= =Iupx -----END PGP SIGNATURE-----