Article View: news.software.nntp
Article #42230Re: Authentication!
From: joe
Date: Wed, 15 Dec 1999 00:00
Date: Wed, 15 Dec 1999 00:00
70 lines
3400 bytes
3400 bytes
Russ Allbery <rra@stanford.edu> wrote:
> I believe what that's trying to say is that if the password field is the
> literal string "+", then nnrpd will attempt to verify the user against the
> system password file. In nnrpd/perm.c:
> /* 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 HAVE_GETSPNAM
> if ((spwd = getspnam(user)) != NULL)
> pwd->pw_passwd = spwd->sp_pwdp;
> #endif
> if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd)))
> continue;
> } else {
> /* Matching for a specific user or just the host? */
> if (user && (!EQ(user, fields[2]) || !EQ(pass, fields[3])))
> continue;
> }
> So it won't check against a crypted password in nnrp.access, only one in
> either /etc/shadow or /etc/passwd.
I am running: NetBSD 1.4.1 (GENERIC) & inn-STABLE_2_2-1999-04-07_03-01
and have this in my man page for nnrp.access:
The third and fourth fields specify the username and pass-
word that the client must use to authenticate themselves
before the server will accept any articles. Note that no
authentication (other then a matching entry in this file)
is required for newsreading. If they are empty, then no
password is required. Whitespace in these fields will
result in the client being unable to properly authenticate
themselves and may be used to disable access.
The clear text username:passwd works fine as stated above.
If the third field is ``+'', then nnrpd(8) uses crypt(3)
to authenticate passed username and password. This might not
work on systems that use a shadow password file, since
nnrpd normally doesn't have the permissions to read that
file. If nnrpd is started in standalone mode, it tries to
adjust its permissions so that it can read the shadow
file. See also the -g option in the manual page for
nnrpd(8).
If I create a new entry in nnrp.access:
*:RP:+::local.info
I am not propted for authentication. If I added a "+" in the fourth
field:
*:RP:+:+:local.info
I am now prompted for authentication, but my username:passwd from
/etc/passwd doesn't work. Note: the other clear text usernames and
passwords still work...
Note: I am only using /etc/passwd and not a /etc/shadow file.
Is there anything obvious that I am missing?
TIA
--
Joe Bishop (joe@qnx.com)
Technical Details
Message-ID:
<838b6t$f1t$1@nntp.qnx.com>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!not-for-mailReferences:
<385100CC.1F725C1B@hogent.be> <3854B6BB.7A69E665@capgemini.fr> <ylg0x6zjyh.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <838b6t$f1t$1@nntp.qnx.com>
Subject: Re: Authentication!
Date: Wed, 15 Dec 1999 00:00:00 +0000
From: joe@qnx.com
References: <385100CC.1F725C1B@hogent.be> <3854B6BB.7A69E665@capgemini.fr> <ylg0x6zjyh.fsf@windlord.stanford.edu>
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!not-for-mail
X-Deja-AN: 560989859
X-Complaints-To: usenet@qnx.com
X-Trace: nntp.qnx.com 945270813 15421 209.226.137.2 (15 Dec 1999 15:13:33 GMT)
Organization: QNX Software Systems Ltd.
User-Agent: tin/1.4-19991113 ("For QNX") (UNIX) (QNX/J (PCI))
NNTP-Posting-Date: 15 Dec 1999 15:13:33 GMT
Newsgroups: news.software.nntp