Article View: news.software.nntp
Article #54647authentication on Linux
From: Anand Vidhani
Date: Fri, 12 Oct 2001 12:03
Date: Fri, 12 Oct 2001 12:03
45 lines
2577 bytes
2577 bytes
Hello folks!
I am using INN server on Linux and Sun solaris Server.
On sun Solaris user authentiction script written in perl is working.
which is
--------------------------------------------------------------------------------
#!/usr/bin/perl
use NDBM_File;
use Fcntl;
tie (%db,
'NDBM_File', '/us
r/local/news/db/users', O_RDWR | O_CREAT, 0640)
or die
"Cannot open /us
r/local/news/db/users: $!\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
'', @alphab
et[rand 64, rand 64];
$db{$user} =
crypt ($passwd
, $salt);
untie %db;
---------------------------------------------------------------------------------
Can any body tell me what changes we require If I want to run this
perl script on Linux machine.
I am new to Linux.
Thanks for your help
Anand Vidhani
Technical Details
Message-ID:
<463197c6.0110120403.403b847d@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.0110120403.403b847d@posting.google.com> Subject: authentication on Linux Date: Fri, 12 Oct 2001 12:03:52 +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: 44 NNTP-Posting-Host: 203.122.29.68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1002888232 18339 127.0.0.1 (12 Oct 2001 12:03:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 12 Oct 2001 12:03:52 GMT