From owner-freebsd-questions Thu Sep 27 0:18:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from bang.esc.net.au (bang.esc.net.au [203.25.185.2]) by hub.freebsd.org (Postfix) with ESMTP id A518637B40D for ; Thu, 27 Sep 2001 00:18:24 -0700 (PDT) Received: from stavros (esc-sr.gw.esc.net.au [210.11.55.1]) by bang.esc.net.au (8.9.3/8.9.3) with SMTP id QAA23730 for ; Thu, 27 Sep 2001 16:48:07 +0930 (CST) Message-ID: <003101c14724$490bf640$3700000a@private.esc.net.au> From: "Stavros Patiniotis" To: Subject: PAM & mysql authentication Date: Thu, 27 Sep 2001 16:46:10 +0930 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002C_01C14773.E92DF980" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_002C_01C14773.E92DF980 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I am in the process of changing the way that several services on my = network authenticate. In particular, I want all services to by = authenticated by way of my username and password system that I have = implement using a database (mySQL). Basically, this means that POP, SMTP = & FTP need to use this new password checking system. I have radius = using external perl scripts which queries the database to achieve = authentication without issue. Now I realise that PAM could be ideally suited to this. What sort of = load can PAM handle, in terms of auth and account type requests? At an = educated guess I have about 60 auth request per minute, but probably = double this during peak periods. I therfore need a solution that will = scale from this, as its only going to get busier. I have found a PAM module (pam_mysql) which gets authentication = information from mySQL. It was linux based, and I have edited it and = got it to compile without issue. I also note that there is a perl module = which I may investigate since my perl skills are much better than my C = ones! I made one substitution that I was not sure about: #include to #include "/usr/X11R6/include/X11/Xalloca.h" Is this acceptible? This is on my private machine which has X loaded on = it, however my actual mail server machine doesn't have this file. Any = comments? I'm using qpopper compiled with pam support to test this module, but I = get the following errors, when trying to login via pop. unable to dlopen(/usr/lib/pam_mysql.so) unable to dlopen(/usr/lib/pam_mysql.so) [dlerror: Shared object "libmysqlclient.so.10" not found] [dlerror: Shared object "libmysqlclient.so.10" not found] adding faulty module: /usr/lib/pam_mysql.so adding faulty module: /usr/lib/pam_mysql.so /usr/lib/pam_mysql.so has the same permissions as the other pam_* files. Interestingly, an incorrect username will not cause the above error, = access is still denied. Also the query doesn't get to the mysql server = (in either case). It doesn't even try to connect to the server. The software packages that I will use are Postfix, ProFtp, Cistron = Radius, and Qpopper. I currently have FreeBSD 4.1 on my mail server and = 3.1 on my private box, but will be upgrading soon. Thanks. Stavros. ------=_NextPart_000_002C_01C14773.E92DF980 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,
 
I am in the process of changing the way that = several=20 services on my network authenticate.  In particular, I want all = services to=20 by authenticated by way of my username and password system that I=20 have implement using a database (mySQL). Basically, this means that = POP,=20 SMTP & FTP need to use this new password checking system.  = I have=20 radius using external perl scripts which queries the database to achieve = authentication without issue.
 
Now I realise that PAM could = be ideally suited=20 to this.  What sort of load can PAM = handle, in=20 terms of auth and account type requests?  At an educated guess I = have about=20 60 auth request per minute, but probably double this during peak = periods. =20 I therfore need a solution that will scale from this, as its only going = to get=20 busier.
 
I have found a PAM module  (pam_mysql) = which gets=20 authentication information from mySQL.  It was linux based, and I = have=20 edited it and got it to compile without issue. I also note that there is = a perl=20 module which I may investigate since my perl skills are much better than = my C=20 ones!
 
I made one substitution that I was not sure=20 about:
#include <alloca.h>
to
#include = "/usr/X11R6/include/X11/Xalloca.h"
 
Is this acceptible? This is on my = private machine=20 which has X loaded on it, however my actual mail server machine doesn't = have=20 this file. Any comments?
 
I'm using qpopper compiled with pam support to = test this=20 module, but I get the following errors, when trying to login via=20 pop.
 
unable to = dlopen(/usr/lib/pam_mysql.so)
unable to=20 dlopen(/usr/lib/pam_mysql.so)
[dlerror: Shared object = "libmysqlclient.so.10"=20 not found]
[dlerror: Shared object "libmysqlclient.so.10" not=20 found]
adding faulty module: /usr/lib/pam_mysql.so
adding faulty = module:=20 /usr/lib/pam_mysql.so
 
/usr/lib/pam_mysql.so has the same permissions = as the=20 other pam_* files.
 
Interestingly, an incorrect username will = not cause=20 the above error, access is still denied.  Also the query doesn't = get to the=20 mysql server (in either case). It doesn't even try to connect to the=20 server.
 
The software packages that I will use are = Postfix,=20 ProFtp, Cistron Radius, and Qpopper.  I currently have FreeBSD 4.1 = on my=20 mail server and 3.1 on my private box, but will be upgrading = soon.
 
 
Thanks.
 
Stavros.
------=_NextPart_000_002C_01C14773.E92DF980-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message