🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72398

Re: Authentication advice

#72398
From: John F. Morse
Date: Thu, 06 Oct 2005 06:17
236 lines
8815 bytes
Jeffrey M. Vinocur wrote:

>In article <yFV0f.376066$5N3.345571@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>I see a syntax error, "Unexpected token: *" which, if I may make
>>a guess, is line 14, (users "*") in the first access stanza 
>>("authenticated"). Perhaps a wildmat is not allowed in a "users:" parameter?
>>    
>>
>
>The problem is that you are missing a colon.  Your line reads:
>
>    users "*"
>
>but should read
>
>    users: "*"
>  
>


Red-faced, I can't believe this. Read on....

I think I have a character-eating spider down here in the basement! ;-)

Again, I swear I checked the readers.conf file carefully -- several times.

I fixed this problem by adding the missing colon, ... but it still 
failed. (I do not drink -- yet!)

So I brushed away the spiders, wiped off my glasses, and found another 
typo -- a colon after "access" in the last stanza! <grrrr>

I removed it, and now have a different error report:

Oct  5 21:33:13 localhost nnrpd[10506]: giuseppe.xanadu-bbs.net 
(192.168.89.140) connect
Oct  5 21:33:13 localhost nnrpd[10506]: giuseppe.xanadu-bbs.net syntax 
error in /etc/news/readers.conf(30), Expected value.
Oct  5 21:33:13 localhost nnrpd[10506]: giuseppe.xanadu-bbs.net times 
user 0.030 system 0.020 idle 0.000 elapsed 0.046
Oct  5 21:33:13 localhost nnrpd[10506]: giuseppe.xanadu-bbs.net time 48 
nntpwrite 0(1)

Another close gaze shows a closing parentheses instead of a closing 
brace (they sure do look alike at 0200 -- on the old fuzzy monitor). ;-)

I actually noticed this error when I was using another computer to 
remotely copy and paste the file into this message. It has a newer and 
clearer monitor. (I can't admit I'm loosing my eyesight, or I'll have to 
go back to Mac'nTalk.)


>>Restating my desires, in case there was some confusion, I want the 
>>authenticated users to have total access to all groups (except control 
>>groups which I will "!" out).
>>    
>>
>
>Right, that's what I understood, and that's what I was planning
>in the original readers.conf I suggested.  But in your version,
>you've provided authenticated users only access to the newspaper
>groups.
>  
>


Once we get this working, maybe I should take the time to gather up all 
of my notes on dual-access privileges, and submit it for the FAQ or manual?

Below is the file in it's (supposedly) corrected condition:


auth "global" {
    hosts: "*"
    auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f /var/lib/news/passlist"
    default: "<anonymous>
}

auth "localhost" {
    hosts: "stdin,localhost,127.0.0.1"
    auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f /var/lib/news/passlist"
    default: "<localhost>"
}

access "authenticated" {
    users: "*"
    read: "brisbee,computers,petchat,raucouscaucus,soapbox"
    post: "brisbee,computers,petchat,raucouscaucus,soapbox"
}

access "special" {
    users: "<localhost>"
    newsgroups: "*"
    access: "RPNAL"
}

access "public" {
    users: "<anonymous>"
    read: "local.*"
    post: "local.*"
}


The reason I modified your example was I didn't understand (still don't) 
the use of the items I will not be using, such as references to "xanadu" 
under the "special" access (or that whole stanza, for that matter).

Since I won't be using <localhost> for access, I presume the "special" 
stanza would never be used. Or is it also providing power-user access 
for a username "xanadu" (a remote newsmaster perhaps)? I'll keep it just 
in case.

My ceramic tile installer finally finished my bathroom this evening, so 
I had a little more time to work on this.

The following readers.conf seems to test out perfectly from an 
authorized account, and from any annonymouse, and does correctly ask for 
authentication:


auth "global" {
    hosts: "*"
    auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f /var/lib/news/passlist"
    default: "<anonymous>"
}

auth "localhost" {
    hosts: "stdin,localhost,127.0.0.1"
    auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f /var/lib/news/passlist"
    default: "<localhost>"
}

access "authenticated" {
    users: "*"
    read: "*,!junk,!control,!control.ch*,!control.n*,!control.r*"
    post: "*,!junk,!control,!control.ch*,!control.n*,!control.r*"
}

access "special" {
    users: "<localhost>"
    newsgroups: "*"
    access: "RPNAL"
}

access "public" {
    users: "<anonymous>"
    read: 
"local.*,test,!brisbee,!computers,!petchat,!raucouscaucus,!soapbox,!control.ch*,!control.n*,!control.r*"
    post: 
"local.*,test,!brisbee,!computers,!petchat,!raucouscaucus,!soapbox,!control.ch*,!control.n*,!control.r*"
}


Feel free to suggest ideas (if needed) to shorten the long parameter 
lines. If none, I would be limited to 8180 or 8191 characters? That's 
quite long.

I believe this would be easier if I would choose to use hierarchies. But 
then the longer group names would show in any news client (or be 
abbreviated in some). The existing five "Brisbee" groups should not be 
changed.

I could live with "local.test" which just might be a good idea since a 
leak could find many "test" groups. I don't plan to peer with USENET, 
but I might pull (suck) a couple of private groups from the Worldnet 
domain. They are not peered to/from USENET, and I wouldn't be POSTing to 
them (can't stream).

In the case of control.cancel, I will probably keep it visible, at least 
for awhile. That might discourage any frequent wholesale canceling if 
those users know others are watching.

Keeping it visible is the reason I had to use three "bang" control 
groups to hide them. Perhaps there is a method to allow access to 
control.cancel but then hide the others more easily (!control.*), if 
there is a particular parsing order?

For your info, below is a telnet session so you can see the command replies:

john@Giuseppe:~$ telnet
telnet> o
(to) optima5 119
Trying 192.168.89.28...
Connected to optima5.xanadu-bbs.net.
Escape character is '^]'.
200 optima5.xanadu-bbs.net InterNetNews NNRP server INN 2.4.3 (20050407 
prerelease) ready (posting ok).
list
215 Newsgroups in form "group high low flags".
local.general 0000000000 0000000001 y
local.test 0000000018 0000000011 y
test 0000000794 0000000795 y
..
mode reader
200 optima5.xanadu-bbs.net InterNetNews NNRP server INN 2.4.3 (20050407 
prerelease) ready (posting ok).
list
215 Newsgroups in form "group high low flags".
local.general 0000000000 0000000001 y
local.test 0000000018 0000000011 y
test 0000000794 0000000795 y
..
authinfo user ********
381 PASS required
authinfo pass ********
281 Ok
list
215 Newsgroups in form "group high low flags".
control.cancel 0000000038 0000000023 n
local.general 0000000000 0000000001 y
local.test 0000000018 0000000011 y
brisbee 0000001469 0000000791 y
computers 0000000150 0000000071 y
petchat 0000000001 0000000001 y
soapbox 0000000012 0000000010 y
raucouscaucus 0000000002 0000000001 y
test 0000000794 0000000795 y
..
quit
205 .
Connection closed by foreign host.
john@Giuseppe:~$

Looks good to me.

Thanks so much for your help, and please forgive my repeated inability 
to see and correct the typos.

Now to play with the syncing from the online server (xrefslave, 
pullnews, suck, newsx, whatever) ....

-- 
John
Technical Details
Message-ID: <4k31f.378909$5N3.296970@bgtnsc05-news.ops.worldnet.att.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!17a21c27!not-for-mail
References: <2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET> <slS0f.375083$5N3.180049@bgtnsc05-news.ops.worldnet.att.net> <di11ll$p95$1@puck.litech.org> <yFV0f.376066$5N3.345571@bgtnsc05-news.ops.worldnet.att.net> <di1htq$2iq$2@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <4k31f.378909$5N3.296970@bgtnsc05-news.ops.worldnet.att.net>
Subject: Re: Authentication advice
Date: Thu, 06 Oct 2005 06:17:36 GMT
From: "John F. Morse" <xanadu.bbs@invalid.net>
References: <2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET> <slS0f.375083$5N3.180049@bgtnsc05-news.ops.worldnet.att.net> <di11ll$p95$1@puck.litech.org> <yFV0f.376066$5N3.345571@bgtnsc05-news.ops.worldnet.att.net> <di1htq$2iq$2@puck.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!17a21c27!not-for-mail
Reply-To: xanadu.bbs@invalid.net
Organization: Xanadu BBS
User-Agent: Debian Thunderbird 1.0.2 (X11/20050331)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: news.software.nntp
In-Reply-To: <di1htq$2iq$2@puck.litech.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 236
NNTP-Posting-Host: a44fe546accc35f9777e3edf45cd69a5
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1128579456
NNTP-Posting-Date: Thu, 06 Oct 2005 06:17:36 GMT