🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by themf Sun, 29 May 2005 19:19
Authorisation from Users on a Linux system
#71722
Author: themf
Date: Sun, 29 May 2005 19:19
27 lines
1967 bytes
Hello,

How do I get the INN system to do its authentication according to the
users on a Linux system?
I mean, in their newsreaders, users should type in the names and
passwords they have on the Linux machine, and innd or nnrpd should use
this to authenticate them.
At the moment, putting "auth: ckpasswd -s"  in readers.conf doesn't
work, i.e. I think it authenticates no matter what, it's obviously not
using the Unix usernames and passwords.
Should I try "pwcheck" instead?

Also, is a sucessful authentication a "281" code, or a "250", and
what's the difference between them (a AUTHINFO SIMPLE and a AUTHINFO
GENERIC), and will my server software handle both?

Which newsreader uses which one, and why?


I'm running inn 2.3.5 running on a Fedora Core 2 system.





Thanks very much.
Re: Authorisation from Users on a Linux system
#71724
Author: Jeffrey M. Vinocur
Date: Sun, 29 May 2005 20:50
38 lines
2178 bytes
In article <1117394384.830543.237020@z14g2000cwz.googlegroups.com>,
 <themf@graffiti.net> wrote:
>
>I mean, in their newsreaders, users should type in the names and
>passwords they have on the Linux machine, and innd or nnrpd should use
>this to authenticate them.

Be careful with this -- you may not be using an encrypted
connection, and unlike your regular login screen, there
is no lockout after multiple failed attemps.


>At the moment, putting "auth: ckpasswd -s"  in readers.conf doesn't
>work, i.e. I think it authenticates no matter what, it's obviously not
>using the Unix usernames and passwords.

Probably your readers.conf is wrong.  Hard to say without seeing
it.


>Should I try "pwcheck" instead?

No.


>Also, is a sucessful authentication a "281" code, or a "250", and
>what's the difference between them (a AUTHINFO SIMPLE and a AUTHINFO
>GENERIC), and will my server software handle both?
>
>Which newsreader uses which one, and why?

Virutally all newsreaders use AUTHINFO USER/PASS, which returns
281 for success.  You shouldn't worry about SIMPLE or GENERIC.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Authorisation from Users on a Linux system
#71728
Author: themf
Date: Mon, 30 May 2005 16:59
46 lines
1948 bytes

Jeffrey M. Vinocur wrote:

>
> >At the moment, putting "auth: ckpasswd -s"  in readers.conf doesn't
> >work, i.e. I think it authenticates no matter what, it's obviously not
> >using the Unix usernames and passwords.
>
> Probably your readers.conf is wrong.  Hard to say without seeing
> it.
>

Here is the -relevant- bit :) :


auth: "localhost" {
      hosts:    "localhost", 127.0.0.1, stdin"
      default    "<localhost>"
}


access "localhost" {
     users:   "<localhost>"
     newsgroups: "*"
     access: RPA
     auth: "ckpasswd -s"  (this line is currently commented out)
}




>
> >Should I try "pwcheck" instead?
>
> No.
>

So, what's it for, and Radius, just out of curiosity?




     thanks.

Re: Authorisation from Users on a Linux system
#71733
Author: Jeffrey M. Vinocur
Date: Mon, 30 May 2005 23:00
72 lines
2802 bytes
In article <1117472357.196116.275410@g49g2000cwa.googlegroups.com>,
 <themf@graffiti.net> wrote:
>
>Jeffrey M. Vinocur wrote:
>
>> Probably your readers.conf is wrong.  Hard to say without seeing
>> it.
>
>Here is the -relevant- bit :) :

If there's anything else in there besides comments, it's probably
relevant.  Somehow readers.conf confuses people easily.


>auth: "localhost" {
>      hosts:    "localhost", 127.0.0.1, stdin"
>      default    "<localhost>"
>}
>
>access "localhost" {
>     users:   "<localhost>"
>     newsgroups: "*"
>     access: RPA
>     auth: "ckpasswd -s"  (this line is currently commented out)
>}

Right, that definitely won't work; I'm surprised it doesn't die
loudly.  The colon on the first line doesn't belong there,
there's one missing on the third line, and the auth: line you say
is commented out belongs in the auth block, not the access block.
Also, your original post suggested that you want to allow
authenticated access from anywhere, not just localhost.

Try this:

auth "anywhere" {
    hosts: "*"
    auth: "ckpasswd -s"
}

auth "localhost" {
    hosts: "localhost, 127.0.0.1, stdin"
    default: "<localhost>"
}

access "general" {
    users: "*"
    newsgroups: "*"
    access: RPA
}

access "readonly" {
    users: "<localhost>"
    read: "*"
    post: "!*"
}


>> >Should I try "pwcheck" instead?
>>
>> No.
>
>So, what's it for, and Radius, just out of curiosity?

pwcheck has since been retired, and I don't recall what it did
offhand.  radius is for authenticating users against a RADIUS
server (you'd know if you had one of those).


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Authorisation from Users on a Linux system
#71735
Author: themf
Date: Tue, 31 May 2005 03:03
18 lines
2050 bytes
> Right, that definitely won't work; I'm surprised it doesn't die
> loudly.  The colon on the first line doesn't belong there,
> there's one missing on the third line, and the auth: line you say
> is commented out belongs in the auth block, not the access block.

Hehe I typed this by hand, and I just made mistakes with those :),
except the auth: ,  that was in the access block, put there by me, cuz
I was under the impression that that's what I was supposed to do.
What is the difference between them, anyway? Couldn't they have been
combined?


Anyway, will try and let you know tomorrow if it worked :)


 Thanks very much for your help.
Re: Authorisation from Users on a Linux system
#71737
Author: Jeffrey M. Vinocur
Date: Tue, 31 May 2005 09:29
15 lines
1644 bytes
In article <1117508605.008759.46360@o13g2000cwo.googlegroups.com>,
 <themf@graffiti.net> wrote:
>
>except the auth: ,  that was in the access block, put there by me, cuz
>I was under the impression that that's what I was supposed to do.
>What is the difference between them, anyway? Couldn't they have been
>combined?

I don't know how to answer this question except to tell you to
reread the readers.conf manpage very carefully.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Authorisation from Users on a Linux system
#71741
Author: themf
Date: Wed, 01 Jun 2005 01:02
12 lines
2000 bytes

> Anyway, will try and let you know tomorrow if it worked :)

OK, it doesn't work. I put in what you wrote and commented everything
else out . INNd doesn't say anything on restart, but I still get a
"281" no matter what.
By the way, I have a "pam" authentication thing on this system, if that
knowledge is of any use to you, the password authentication goes
through something else, or Something.... I don't know.... hehe :}
Do you have any more tips? :)
Re: Authorisation from Users on a Linux system
#71742
Author: Szymon Sokół
Date: Wed, 01 Jun 2005 06:59
33 lines
3036 bytes
themf@graffiti.net wrote:

> OK, it doesn't work. I put in what you wrote and commented everything
> else out . INNd doesn't say anything on restart, but I still get a
> "281" no matter what.
In:
    auth: "ckpasswd -s"
try using the full path, ie. 
    auth: "/usr/local/news/bin/auth/passwd/ckpasswd -s"

or whatever the actual location of your ckpasswd is. Also, check if ckpasswd
by itself is working correctly - to quote the manual:

	Most systems require special privileges to call getspnam(3), so in
	order to use this option you may need to make ckpasswd setgid to
	some group (like group "shadow") or even setuid root.  ckpasswd has
	not been specifically audited for such uses!  It is, however, a
	very small program that you should be able to check by hand for
	security.

So try something like:
(echo "ClientAuthname: yourname"; echo "ClientPassword: yourpassword") \
|/usr/local/news/bin/auth/passwd/ckpasswd -s
and see whether it works.
If it says "ckpasswd: invalid password for user yourname" then you should
setuid ckpasswd to root (and make sure the filesystem on which it resides
isn't mounted nosuid), then repeat the test. 

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: Authorisation from Users on a Linux system
#71743
Author: Jeffrey M. Vinocur
Date: Wed, 01 Jun 2005 10:33
49 lines
2924 bytes
In article <d7jmcs$qnt$1@galaxy.uci.agh.edu.pl>,
Szymon Sokó³  <szymon@bastard.operator.from.hell.pl> wrote:
>themf@graffiti.net wrote:
>
>> OK, it doesn't work. I put in what you wrote and commented everything
>> else out . INNd doesn't say anything on restart, but I still get a
>> "281" no matter what.

Hrm.  That's what I get for writing a readers.conf off the top of
my head without testing.  Time to debug properly.  In your
syslog.conf, you currently have three lines like 

news.crit                                       /var/log/news/news.crit
news.err                                        /var/log/news/news.err
news.notice                                     /var/log/news/news.notice

Add a fourth line like this:

news.debug                                     /var/log/news/news.debug

and HUP your syslogd.  Then try connecting to the news server
again; you should get lots of detailed debugging information in
the news.debug log -- post that here.


>In:
>    auth: "ckpasswd -s"
>try using the full path, ie. 
>    auth: "/usr/local/news/bin/auth/passwd/ckpasswd -s"

This is not the problem; it would make authentication always
fail.


>So try something like:
>(echo "ClientAuthname: yourname"; echo "ClientPassword: yourpassword") \
>|/usr/local/news/bin/auth/passwd/ckpasswd -s
>and see whether it works.
>If it says "ckpasswd: invalid password for user yourname" then you should
>setuid ckpasswd to root (and make sure the filesystem on which it resides
>isn't mounted nosuid), then repeat the test. 

Neither of these is the problem; they would make authentication
always fail.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Authorisation from Users on a Linux system
#71745
Author: Szymon Sokół
Date: Wed, 01 Jun 2005 12:03
22 lines
2551 bytes
Jeffrey M. Vinocur <jeff@litech.org> wrote:
> In article <d7jmcs$qnt$1@galaxy.uci.agh.edu.pl>,
> Szymon Sokół  <szymon@bastard.operator.from.hell.pl> wrote:

> >So try something like:
> >(echo "ClientAuthname: yourname"; echo "ClientPassword: yourpassword") \
> >|/usr/local/news/bin/auth/passwd/ckpasswd -s
> >and see whether it works.
> >If it says "ckpasswd: invalid password for user yourname" then you should
> >setuid ckpasswd to root (and make sure the filesystem on which it resides
> >isn't mounted nosuid), then repeat the test. 

> Neither of these is the problem; they would make authentication
> always fail.

Yes, I misunderstood the problem - thought that his authentication *does*
always fail, rather than always succeeds...
-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: Authorisation from Users on a Linux system
#71758
Author: themf
Date: Thu, 02 Jun 2005 06:48
61 lines
3747 bytes

Jeffrey M. Vinocur wrote:

> the news.debug log -- post that here.

(this is a repost of this message, so hopefully this won't show up
twice)

Ok, this is what I got:

Jun  2 07:43:37 localhost innd: localhost connected 16 streaming
allowed
Jun  2 07:43:37 localhost nnrpd[4757]: Reading config from
/etc/news/inn.conf
Jun  2 07:43:37 localhost nnrpd[4757]: SERVER perl filtering enabled
Jun  2 07:43:37 localhost nnrpd[4757]: localhost.localdomain connect
Jun  2 07:43:37 localhost nnrpd[4757]: Reading access from
/etc/news/readers.conf
Jun  2 07:43:37 localhost nnrpd[4757]: localhost.localdomain res
<localhost>
Jun  2 07:43:37 localhost nnrpd[4757]: localhost.localdomain match_user
<localhost> <localhost>


Then I commented out the entire auth: "localhost" part  in your text,
restarted inn, now this is what I get:

Jun  2 07:46:32 localhost innd: localhost connected 16 streaming
allowed
Jun  2 07:46:32 localhost nnrpd[4850]: Reading config from
/etc/news/inn.conf
Jun  2 07:46:32 localhost nnrpd[4850]: SERVER perl filtering enabled
Jun  2 07:46:32 localhost nnrpd[4850]: localhost.localdomain connect
Jun  2 07:46:32 localhost nnrpd[4850]: Reading access from
/etc/news/readers.conf
Jun  2 07:46:32 localhost nnrpd[4850]: localhost.localdomain
no_success_auth
Jun  2 07:46:32 localhost innd: localhost:16 closed seconds 0 accepted
0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain auth
starting authenticator ckpasswd -s
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain auth_err
ckpasswd: user root password doesn't match.
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain bad_hook
program exited with status 1
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain auth
authenticator failed
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain
no_success_auth
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain bad_auth
Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain times user
0.004 system 0.004 elapsed 0.222


I chowned ckpasswd to root.root, still same message.
If I gave it a user that's not there on the system, it identifies this
correctly, however. (so it's getting through at least part way).

Now what?
Re: Authorisation from Users on a Linux system
#71762
Author: Jeffrey M. Vinocur
Date: Sat, 04 Jun 2005 03:16
21 lines
1943 bytes
In article <1117694895.612375.240830@z14g2000cwz.googlegroups.com>,
 <themf@graffiti.net> wrote:
>
>Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain auth
>starting authenticator ckpasswd -s
>Jun  2 07:46:33 localhost nnrpd[4850]: localhost.localdomain auth_err
>ckpasswd: user root password doesn't match.
>
>I chowned ckpasswd to root.root, still same message.
>If I gave it a user that's not there on the system, it identifies this
>correctly, however. (so it's getting through at least part way).

Okay, root.root isn't going to give ckpasswd the ability to
verify passwords.  Depending on your system, the configuration
would vary, but probably root.news would work, provided you make
it mode 4750.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Authorisation from Users on a Linux system
#71767
Author: themf
Date: Sat, 04 Jun 2005 21:51
19 lines
1866 bytes


> Okay, root.root isn't going to give ckpasswd the ability to
> verify passwords.  Depending on your system, the configuration
> would vary, but probably root.news would work, provided you make
> it mode 4750.

Oh My God, Eureka! It's WORKING!! :))
What is mode 4750 exactly, btw?
And why did I need to comment out the "auth localhost" part, and why
had you thought it was necessary?


I can't thank you enough.


Cheers!
Re: Authorisation from Users on a Linux system
#71766
Author: Jeffrey M. Vinocur
Date: Sun, 05 Jun 2005 02:20
41 lines
2487 bytes
In article <1117921918.453974.307480@z14g2000cwz.googlegroups.com>,
 <themf@graffiti.net> wrote:
>
>> root.news would work, provided you make it mode 4750.
>
>Oh My God, Eureka! It's WORKING!! :))
>What is mode 4750 exactly, btw?

Okay, all of these modes would work for you:

4750 is rwsr-x---
4550 is r-sr-x---
4754 is rwsr-xr--
4554 is r-sr-xr--

The key here is that the program is SUID (set user ID), because
of the 4 on the front (can also be given by `chmod u+s`).  That
means that the program always has the power of its owner (in this
case, root), even when started by someone else.

Therefore it's important to limit who can start it.  This is why
there must not be "others execute" permission.  Also, you want to
restrict who can modify the file.


>And why did I need to comment out the "auth localhost" part, and why
>had you thought it was necessary?

Your original readers.conf included references to localhost, so I
thought you might want to have a default level of access for
connections coming from localhost.

Even if you left them in, you'd still be able to authenticate
from localhost by choosing the appropriate option in your client
configuration; that bit of readers.conf does not keep you from
authenticating for full access.


-- 
Jeffrey M. Vinocur
jeff@litech.org
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