๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Anand Vidhani Fri, 12 Oct 2001 12:09
user authentication on Linux for news groups
#54649
Author: Anand Vidhani
Date: Fri, 12 Oct 2001 12:09
40 lines
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
Re: user authentication on Linux for news groups
#54651
Author: Franz Georg Kรถhler
Date: Fri, 12 Oct 2001 13:34
18 lines
1797 bytes
* quoting [Anand Vidhani <avidhani@ggn.aithent.com>]
> 
> 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.

This looks like the sample perl script which is distributed in
reader.conf's man page.
It doesn't do user authentification itsself, it just writes user and
password to a dbm file, where inn ought to read it from.
You can control this behaviour in readers.conf, see the man page or your
old readers.conf from your solaris box for details.


Re: user authentication on Linux for news groups
#54663
Author: Michael Weber
Date: Sat, 13 Oct 2001 08:19
83 lines
3686 bytes
You can use the shadow user authentication of your linux box, by adding
following lines to ~news/etc/readers.conf

auth "shadow" {
        hosts: "*"
#interesting part
        auth: "ckpasswd -s"
#end of interestingpart
}

access "passwords" {
        newsgroups: "*,!local.admin,!control*,!junk"
        access: RP
}

access "god" {
        users: "michael"
        newsgroups: "local.*"
        access: RPA
}

But, you have to adjust the permissons of
~news/bin/auth/passwd/ckpasswd to have access to the shadow-system, as root
of course:
chown news.shadow ~news/bin/auth/passwd/ckpasswd
chmod 2750 ~news/bin/auth/passwd/ckpasswd

then it should work.

Michael Weber

----- Original Message -----
From: "Anand Vidhani" <avidhani@ggn.aithent.com>
Newsgroups: news.software.nntp
Sent: Friday, October 12, 2001 2:09 PM
Subject: user authentication on Linux for news groups


> 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



Re: user authentication on Linux for news groups
#54666
Author: Jeffrey M. Vinocur
Date: Sat, 13 Oct 2001 16:17
19 lines
1562 bytes
In article <9q8t9b$22i$00$1@news.t-online.com>,
Michael Weber <michael@mmc-startup.com> wrote:
>You can use the shadow user authentication of your linux box, by adding
>following lines to ~news/etc/readers.conf
>
>auth "shadow" {
>        hosts: "*"
>        auth: "ckpasswd -s"
>}

Actually, if it's Redhat, that won't work (assuming PAM is
involved).  You need pamckpasswd instead:

http://www.mathie.cx/~graeme/software/pamckpasswd.tar.gz                        

-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: user authentication on Linux for news groups
#54687
Author: Anand Vidhani
Date: Mon, 15 Oct 2001 10:59
27 lines
1868 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<9q9pe0$fbe$1@marduk.litech.org>...
> In article <9q8t9b$22i$00$1@news.t-online.com>,
> Michael Weber <michael@mmc-startup.com> wrote:
> >You can use the shadow user authentication of your linux box, by adding
> >following lines to ~news/etc/readers.conf
> >
> >auth "shadow" {
> >        hosts: "*"
> >        auth: "ckpasswd -s"
> >}
> 
> Actually, if it's Redhat, that won't work (assuming PAM is
> involved).  You need pamckpasswd instead:
> 
> http://www.mathie.cx/~graeme/software/pamckpasswd.tar.gz



Hello Folks!
Thanks for all your replies.
Michael I using Red Hat 7.1 what changes I need in Readers.conf
1.) Can I write pamckpasswd -s istead of ckpasswd -s 
2.) Can I change the permission and owner of  ckpaaswd file.
Please tell me in detail 
Thanks for your help Group.
Anand VIdhani
Re: user authentication on Linux for news groups
#54694
Author: Jeffrey M. Vinocur
Date: Tue, 16 Oct 2001 01:11
19 lines
1601 bytes
In article <463197c6.0110150259.40e3f550@posting.google.com>,
Anand Vidhani <avidhani@ggn.aithent.com> wrote:
>
>Michael I using Red Hat 7.1 what changes I need in Readers.conf
>1.) Can I write pamckpasswd -s istead of ckpasswd -s 

You won't need the -s.  Did you read the documentation with
pamckpasswd?


>2.) Can I change the permission and owner of  ckpaaswd file.

chown root.news pamckpasswd
chmod 4554 pamckpasswd

-- 
Jeffrey M. Vinocur
jeff@litech.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads