🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #51288

Re: I can make passwords, now...

#51288
From: Jeffrey M. Vinocur
Date: Sat, 17 Mar 2001 04:24
100 lines
4478 bytes
In article <m33dcdyrvf.fsf@pyrophore.ogoense.net>,
Rebecca Ore  <rebecca@ogoense.net> wrote:
>
>Given what I'm already using, how would I modify this, say, to have
>the person log in with user name and password and read the same
>restricted 

I had an awful readers.conf to start, until I finally grokked
that auth blocks and access blocks need not (and probably should
not) correspond one-to-one.  You want to assign an incoming
connection a user id, using whatever means is appropriate -- the
idea is that a given user gets the same id regardless of
connection method.  Then you assign access based on user id.  

In a sane scheme, the sets of people you want to put in different
reader brackets will have distinguishable user ids.  Note that
the password file can have fully-qualified (i.e., user@host)
names which is very useful.

I've got something like this, where the idea is that users with
shell accounts get essentially full access no matter how they
choose to connect, and some other users get access only to a
local hierarchy "foo".  (This is easy because the foo users all
have easily-recognized identities -- if they didn't we would put
the "ckpasswd -f foo_users" in a separate block and use "key:" to
make the foo access block matched them and only them.)

(Russ...is this a useful example?  I can stick it on the web
or whatever.)

---BEGIN---
# This gets the generic inbound connections.
auth "foreign" {
    hosts: *
    auth: "ckpasswd -f /usr/local/news/db/newsusers"
    auth: "ckpasswd -f /usr/local/news/db/foo_users"
    default: "<FAIL>"
}

# This matches trusted hosts, we try to resolve them using
# `ident` first, if that fails or they want to use another
# account, they can send username/password to be validated
# against several databases until one matches.  Since we trust
# the wires, we allow cleartext authentication against the system
# password database using Graeme Mathieson's `pamckpasswd`.
auth "internalnet" {
    hosts: "192.168.0.0/16,marduk.litech.org"
    res: "ident -t"
    auth: "pamckpasswd"
    auth: "ckpasswd -f /usr/local/news/db/newsusers"
    auth: "ckpasswd -f /usr/local/news/db/foo_users"
    default: "<FAIL>"
    default-domain: "litech.org"
}

# At this point user ids are assigned correctly.  Some users have
# their @litech.org identity, others got an identity based on the
# password files (in the "newsusers" password file, some users
# have a random identity and some have user@litech.org associated
# with a plaintext/news-only password for coming in over insecure
# networks).

# Get the random other users first
access "nonlitech" {
    users: "*"
    newsgroups: "!foo.*,*"
}

# People for private hierarchy
access "foo" {
    users: "*@foo.example.com"
    virtualhost: "true"
    pathhost: foo.example.com
    newsgroups: "!*,foo.*"
}

# Trap failures
access "fail" {
    users: "<FAIL>,<FAIL>@litech.org"
    read: "!*,litech.test"
    post: "!*"
}

---END---


>        access: "Read Post"

FYI, access: is deprecated...if you use newsgroups: you get
reading and posting, if you want to separate that functionality
you can use read: and post: with different patterns.  Really the
only thing access: ought to be used for is the other flags (for
newnews and Approved headers).



-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <98uotv$b8$1@marduk.litech.org>
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!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!news-east.rr.com!news.rr.com!portc01.blue.aol.com!newsstand.cit.cornell.edu!lnsnews.lns.cornell.edu!news.litech.org!not-for-mail
References: <m33dcdyrvf.fsf@pyrophore.ogoense.net>

Show Full Headers
Complete Article Headers
Message-ID: <98uotv$b8$1@marduk.litech.org>
Subject: Re: I can make passwords, now...
Date: Sat, 17 Mar 2001 04:24:31 +0000
From: jmv16@cornell.edu (Jeffrey M. Vinocur)
References: <m33dcdyrvf.fsf@pyrophore.ogoense.net>
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!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!news-east.rr.com!news.rr.com!portc01.blue.aol.com!newsstand.cit.cornell.edu!lnsnews.lns.cornell.edu!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Cornell University
Lines: 99
Sender: jeff@litech.org
NNTP-Posting-Host: marduk.litech.org
X-Trace: marduk.litech.org 984803071 360 128.84.154.54 (17 Mar 2001 04:24:31 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sat, 17 Mar 2001 04:24:31 +0000 (UTC)
X-Newsreader: trn 4.0-test75 (Feb 13, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)