🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
10 messages
10 total messages Started by lalith Fri, 31 Jan 1997 00:00
Authorization and NNTP
#14611
Author: lalith
Date: Fri, 31 Jan 1997 00:00
24 lines
1311 bytes
Hi:

I'm a relative-newbie to NNTP and, after installing INN, have
started to wonder about how to force NNRP clients to 
authorize themselves to the NNRPd before being able to access 
certain newsgroups, etc.

That is, rather than authorize clients based on some config files,
etc on the server side, I'd like to force them to prompt 
for username/passwd and validate these on the server e.g. check 
the passwd file.

I noticed on perfunctory observation that trn has code to allow
it to handle authorization requests by the server.

Any hints as to where I should look for more info on this topic??

Thanks!

lalith


Re: Authorization and NNTP
#14732
Author: Chris Bellomy
Date: Tue, 04 Feb 1997 00:00
37 lines
2238 bytes
lalith (lalith@documentum.com) wrote:

: I'm a relative-newbie to NNTP and, after installing INN, have
: started to wonder about how to force NNRP clients to 
: authorize themselves to the NNRPd before being able to access 
: certain newsgroups, etc.
: 
: That is, rather than authorize clients based on some config files,
: etc on the server side, I'd like to force them to prompt 
: for username/passwd and validate these on the server e.g. check 
: the passwd file.

If you want to use the passwd file for authentication, set up
a profile something like this in nnrp.access:

*:R P:+:+:*

For my domain this is the default.  Below this I allow unauthenticated
access for users connecting from within our domain; users outside our
domain must have a valid username/passwd to use the server.  To meet
your specific requirements will require different tinkering with the
default and subsequent settings; however, the important part (nearly
undocumented) is the '+' to refer to the machine's passwd file.

If your system uses shadow passwords, you'll need to modify the stock
nnrpd.  I have a ready hack for Solaris 2.x; if there's any demand, I'll
post it here and forward it to Dave Barr and/or the ISC.  It's a pretty
simple hack.  :)

-- 
Chris Bellomy				Flashnet Communications
Senior System Administrator		Fort Worth, Texas
cbellomy@flash.net			(817)332-8878


Re: Authorization and NNTP
#14741
Author: Heiko W.Rupp
Date: Tue, 04 Feb 1997 00:00
23 lines
1494 bytes
In <32F13DC5.4A06@documentum.com>, lalith wrote:
:|I'm a relative-newbie to NNTP and, after installing INN, have
:|started to wonder about how to force NNRP clients to 
:|authorize themselves to the NNRPd before being able to access 
:|certain newsgroups, etc.

It is in the INN faq in part 6.19 

:|That is, rather than authorize clients based on some config files,
:|etc on the server side, I'd like to force them to prompt 
:|for username/passwd and validate these on the server e.g. check 
:|the passwd file.

Inn 1.5 supports this too. Look at the FAQ.

-- 
Heiko W.Rupp hwr@pilhuhn.de
INN FAQ can be found in ftp://ftp.xlink.net/pub/news/docs/
                   Stoppt den Kinderwahnsinn !! -- Esst nur deutsche Kinder !!


Re: Authorization and NNTP
#15010
Author: Marc LAMBERT
Date: Wed, 12 Feb 1997 00:00
14 lines
1154 bytes
In article <5ctp3a$623@excalibur.flash.net>, cbellomy@flash.net says...
>If you want to use the passwd file for authentication, set up
>a profile something like this in nnrp.access:
>
>*:R P:+:+:*

It works on a innd 1.5.1 version.
Do you know how to apply this on a previous version (1.4.3) ?

                                         ML (lambert@u-paris10.fr)


Re: Authorization and NNTP
#15020
Author: Chris Bellomy
Date: Thu, 13 Feb 1997 00:00
93 lines
3411 bytes
Mike Horwath (drechsau@visi.com) wrote:
: In news.software.nntp Marc LAMBERT <lambert@u-paris10.fr> wrote:
: : In article <5ctp3a$623@excalibur.flash.net>, cbellomy@flash.net says...
: : >If you want to use the passwd file for authentication, set up
: : >a profile something like this in nnrp.access:
: : >
: : >*:R P:+:+:*
: 
: : It works on a innd 1.5.1 version.
: : Do you know how to apply this on a previous version (1.4.3) ?
: 
: What operating system does this work under?
: 
: Standard Solaris 2.5.1 which is NIS client of a SunOS 4.1.4 system and
: it does *not* work.

The only way it will work as distributed is if you /etc/passwd for
everything, including passwords.  If you use shadow passwords, it
will break.

Here is a patch I constructed to make this scheme work using shadow
passwords under Solaris 2.5.1.  (CAUTION: I think I ran diff with the
files in reverse order.  Let me know if this is so.)


*** nnrpd.c	Tue Dec 31 16:14:09 1996
--- ../nnrpd/nnrpd.c	Fri Nov 29 17:32:18 1996
***************
*** 11,17 ****
  #define MAINLINE
  #include "nnrpd.h"
  #include <netdb.h>
- #include <shadow.h>
  #include <pwd.h>
  #if	defined(HPUX)
  #include <sys/pstat.h>
--- 11,16 ----
***************
*** 316,322 ****
      register char	*p;
      register BOOL	found;
      register int	i;
!     struct spwd		*pwd;
      char		buff[BIG_BUFFER];
      char		*fields[5];
  
--- 315,321 ----
      register char	*p;
      register BOOL	found;
      register int	i;
!     struct passwd	*pwd;
      char		buff[BIG_BUFFER];
      char		*fields[5];
  
***************
*** 355,363 ****
  
  	/* See if we should lookup a specific user in the passwd file */
  	if (user && pass && EQ(fields[2], "+")) {
! 	    if ((pwd = getspnam(user)) == NULL)
  		continue;
! 	    if (!EQ(pwd->sp_pwdp, crypt(pass, pwd->sp_pwdp)))
  		continue;
  	}
  	/* Matching for a specific user or just the host? */
--- 354,362 ----
  
  	/* See if we should lookup a specific user in the passwd file */
  	if (user && pass && EQ(fields[2], "+")) {
! 	    if ((pwd = getpwnam(user)) == NULL)
  		continue;
! 	    if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd)))
  		continue;
  	}
  	/* Matching for a specific user or just the host? */


---end patch---

: I have not tried changing nsswitch.conf to be passwd_compat or
: whatever it is for using the old NIS way of plussing in users.

I don't think it would matter.  Notice that the code uses the
getpwnam() function, which I believe specifically references the
/etc/passwd file.

-- 
Chris Bellomy				Flashnet Communications
Senior System Administrator		Fort Worth, Texas
cbellomy@flash.net			(817)332-8878

Re: Authorization and NNTP
#15170
Author: Jeff Mansukhani
Date: Wed, 19 Feb 1997 00:00
29 lines
1697 bytes
Chris Bellomy wrote:
> 
> Mike Horwath (drechsau@visi.com) wrote:
> : In news.software.nntp Marc LAMBERT <lambert@u-paris10.fr> wrote:
> : : In article <5ctp3a$623@excalibur.flash.net>, cbellomy@flash.net says...
> : : >If you want to use the passwd file for authentication, set up
> : : >a profile something like this in nnrp.access:
> : : >
> : : >*:R P:+:+:*
> :


Hi,

I'm relatively new to INN and this topic seem to relate to a question of
mine, so, I was wondering if perhaps someone could give me a little bit
of pointer.  

In the nnrp.access file how can I specify allowing a range of addresses
to access certain sites but not other?  I tried using a deny format and
the follow with a permit all entry but that didn't work (neither did
reversing the order).  Would someone give me some pointer please?

Thanks a lot.

Jeff

Re: Authorization and NNTP
#15191
Author: Chris Bellomy
Date: Thu, 20 Feb 1997 00:00
30 lines
1994 bytes
Mark Atwood (zot@ampersand.com) wrote:
: cbellomy@flash.net (Chris Bellomy) writes:
: | 
: | If you want to use the passwd file for authentication, set up
: | a profile something like this in nnrp.access:
: | 
: | *:R P:+:+:*
: | 
: | For my domain this is the default.  Below this I allow unauthenticated
: | access for users connecting from within our domain; users outside our
: | domain must have a valid username/passwd to use the server.  To meet
: | your specific requirements will require different tinkering with the
: | default and subsequent settings; however, the important part (nearly
: | undocumented) is the '+' to refer to the machine's passwd file.
: 
: I would call it completely undocumented myself. How did you
: find that? Reading the sources?

As a matter of fact, that *is* how I found that.  I actually
forgot where I came across it until I read your post.  So, yes,
I guess it *is* undocumented.  :)

-- 
Chris Bellomy				Flashnet Communications
Senior System Administrator		Fort Worth, Texas
cbellomy@flash.net			(817)332-8878


Re: Authorization and NNTP
#15199
Author: Mark Atwood
Date: Thu, 20 Feb 1997 00:00
25 lines
1573 bytes
cbellomy@flash.net (Chris Bellomy) writes:
| 
| If you want to use the passwd file for authentication, set up
| a profile something like this in nnrp.access:
| 
| *:R P:+:+:*
| 
| For my domain this is the default.  Below this I allow unauthenticated
| access for users connecting from within our domain; users outside our
| domain must have a valid username/passwd to use the server.  To meet
| your specific requirements will require different tinkering with the
| default and subsequent settings; however, the important part (nearly
| undocumented) is the '+' to refer to the machine's passwd file.
| 

I would call it completely undocumented myself. How did you
find that? Reading the sources?

-- 
Mark Atwood       | Cuius testiculos habes,
zot@ampersand.com | habeas cardia et cerebellum.


Re: Authorization and NNTP
#15217
Author: Robert Bannocks
Date: Fri, 21 Feb 1997 00:00
95 lines
3718 bytes
Does not this require the nnrpd to run as root or as set-uid?
Chris Bellomy (cbellomy@flash.net) wrote:
: Mike Horwath (drechsau@visi.com) wrote:
: : In news.software.nntp Marc LAMBERT <lambert@u-paris10.fr> wrote:
: : : In article <5ctp3a$623@excalibur.flash.net>, cbellomy@flash.net says...
: : : >If you want to use the passwd file for authentication, set up
: : : >a profile something like this in nnrp.access:
: : : >
: : : >*:R P:+:+:*
: : 
: : : It works on a innd 1.5.1 version.
: : : Do you know how to apply this on a previous version (1.4.3) ?
: : 
: : What operating system does this work under?
: : 
: : Standard Solaris 2.5.1 which is NIS client of a SunOS 4.1.4 system and
: : it does *not* work.

: The only way it will work as distributed is if you /etc/passwd for
: everything, including passwords.  If you use shadow passwords, it
: will break.

: Here is a patch I constructed to make this scheme work using shadow
: passwords under Solaris 2.5.1.  (CAUTION: I think I ran diff with the
: files in reverse order.  Let me know if this is so.)


: *** nnrpd.c	Tue Dec 31 16:14:09 1996
: --- ../nnrpd/nnrpd.c	Fri Nov 29 17:32:18 1996
: ***************
: *** 11,17 ****
:   #define MAINLINE
:   #include "nnrpd.h"
:   #include <netdb.h>
: - #include <shadow.h>
:   #include <pwd.h>
:   #if	defined(HPUX)
:   #include <sys/pstat.h>
: --- 11,16 ----
: ***************
: *** 316,322 ****
:       register char	*p;
:       register BOOL	found;
:       register int	i;
: !     struct spwd		*pwd;
:       char		buff[BIG_BUFFER];
:       char		*fields[5];
:   
: --- 315,321 ----
:       register char	*p;
:       register BOOL	found;
:       register int	i;
: !     struct passwd	*pwd;
:       char		buff[BIG_BUFFER];
:       char		*fields[5];
:   
: ***************
: *** 355,363 ****
:   
:   	/* See if we should lookup a specific user in the passwd file */
:   	if (user && pass && EQ(fields[2], "+")) {
: ! 	    if ((pwd = getspnam(user)) == NULL)
:   		continue;
: ! 	    if (!EQ(pwd->sp_pwdp, crypt(pass, pwd->sp_pwdp)))
:   		continue;
:   	}
:   	/* Matching for a specific user or just the host? */
: --- 354,362 ----
:   
:   	/* See if we should lookup a specific user in the passwd file */
:   	if (user && pass && EQ(fields[2], "+")) {
: ! 	    if ((pwd = getpwnam(user)) == NULL)
:   		continue;
: ! 	    if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd)))
:   		continue;
:   	}
:   	/* Matching for a specific user or just the host? */


: ---end patch---

: : I have not tried changing nsswitch.conf to be passwd_compat or
: : whatever it is for using the old NIS way of plussing in users.

: I don't think it would matter.  Notice that the code uses the
: getpwnam() function, which I believe specifically references the
: /etc/passwd file.

: -- 
: Chris Bellomy				Flashnet Communications
: Senior System Administrator		Fort Worth, Texas
: cbellomy@flash.net			(817)332-8878

Re: Authorization and NNTP
#15310
Author: Chris Bellomy
Date: Tue, 25 Feb 1997 00:00
13 lines
1126 bytes
Robert Bannocks (cc_s551@kingston.ac.uk) wrote:
: Does not this require the nnrpd to run as root or as set-uid?

Either that, or /etc/shadow can be set to 440 (with user 'news'
in the correct group).  This was my (however kludgy) solution.

-- 
Chris Bellomy				Flashnet Communications
Senior System Administrator		Fort Worth, Texas
cbellomy@flash.net			(817)332-8878

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