🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90559

Re: identify user who posted via localhost

#90559
From: John
Date: Wed, 19 Jul 2023 16:26
39 lines
2504 bytes
Russ Allbery <eagle@eyrie.org> writes:

> John <john@building-m.simplistic-anti-spam-measure.net> writes:
>
>> It seems I spoke too soon... I thought adding "res" would resolve the
>> username without necessarily requiring further authentication, but Gnus
>> is prompting me for a password and I see this in my log file:
>
>> nnrpd[2796111]: localhost (::1) connect - port 119
>> nnrpd[2796111]: Reading access from /etc/news/readers.conf
>> nnrpd[2796111]: localhost res starting resolver ident
>> nnrpd[2796111]: localhost res resolver successful, user john
>> nnrpd[2796111]: localhost res john
>> nnrpd[2796111]: localhost no_match_user john <localhost>
>> nnrpd[2796111]: localhost no_access_realm
>
>> Is there a way to do the username resolution but *not* prompt for a
>> password at all?
>
> You have to make sure there's an access stanza that matches all possible
> identities returned from the auth stanza.  In your case, presumably that
> means you want an access stanza with users: "*".
>
> The way readers.conf works is that the auth block assigns an identity and
> the access block that matches that identity says what permissions the user
> has.  Presumably previously you had an auth block that matched users from
> localhost and assigned the <localhost> identity and had an access stanza
> that matched that identity, but now that you're using ident, the identity
> is now something like "john" instead of "<localhost>" and it's not
> matching any more.

Ah, that makes sense, and indeed that change seems to have things
working as expected -- if I connect via localhost, I'm not prompted for
a password but I see in the logs that it identifies my username. If I
attempt to connect from outside, I still get booted off with a 502.

Thank you,

John
Technical Details
Message-ID: <86o7k7q34y.fsf@building-m.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <87edl61tjp.fsf@hope.eyrie.org> <86wmywpsey.fsf@building-m.net>

Show Full Headers
Complete Article Headers
Message-ID: <86o7k7q34y.fsf@building-m.net>
Subject: Re: identify user who posted via localhost
Date: Wed, 19 Jul 2023 16:26:05 +0000
From: John <john@building-m.simplistic-anti-spam-measure.net>
References: <87edl61tjp.fsf@hope.eyrie.org> <86wmywpsey.fsf@building-m.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Building M
MIME-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:q8FrpOQC+DousHt7rep8DlgbQqw=