Article View: news.software.nntp
Article #54649user authentication on Linux for news groups
From: Anand Vidhani
Date: Fri, 12 Oct 2001 12:09
Date: Fri, 12 Oct 2001 12:09
40 lines
2408 bytes
2408 bytes
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 for news groups. 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
Technical Details
Message-ID:
<463197c6.0110120409.47c0ab13@posting.google.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <463197c6.0110120409.47c0ab13@posting.google.com> Subject: user authentication on Linux for news groups Date: Fri, 12 Oct 2001 12:09:17 +0000 From: avidhani@ggn.aithent.com (Anand Vidhani) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mail Newsgroups: news.software.nntp Organization: http://groups.google.com/ Lines: 39 NNTP-Posting-Host: 203.122.29.68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1002888557 18423 127.0.0.1 (12 Oct 2001 12:09:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 12 Oct 2001 12:09:17 GMT