inn-workers Digest V3 #267
Anand Vidhani
avidhani at ggn.aithent.com
Wed Oct 10 05:54:06 UTC 2001
> Hello,
I am using INN on Linux 7.1. Now I want to do user authetication for INN.
How can we do this?.
We are using INN on Sun Solaris too. I have used the perl script as mentioned below , for user authentication. Its working fine on sun
solaris.
Could any body tell me what changes we require in this perl script so that It will work on LINUX 7.1.
{ #!/usr/bin/perl
use NDBM_File;
use Fcntl;
tie (%db, 'NDBM_File', '/path/to/database', O_RDWR | O_CREAT, 0640)
or die "Cannot open /path/to/database: $!\n";
$| = 1;
print "Username: ";
my $user = <STDIN>;
chomp $user;
print "Password: ";
my $passwd = <STDIN>;
chomp $passwd;
my @alphabet = ('.', '/', 0..9, 'A'..'Z', 'a'..'z');
my $salt = join '', @alphabet[rand 64, rand 64];
$db{$user} = crypt ($passwd, $salt);
untie %db;
}
I am a new user of UNIX env.
PLease help.
Thanks
Anand Vidhani
More information about the inn-workers
mailing list