Gentoo Archives: gentoo-server

From: Claudinei Matos <claudineimatos@×××××.com>
To: gentoo-user@l.g.o, gentoo-server@l.g.o
Subject: [gentoo-server] samba + mysql + crypt password (pam or passdb)?
Date: Tue, 21 Jun 2005 16:47:59
Message-Id: fd8aab850506210944486a8c8e@mail.gmail.com
1 hi guys,
2
3 I'm trying to use mysql with samba to authenticate users. The fist
4 thing I've tryed was passdb wich one is very useful except that I
5 can't personalize the querys but that's not a problem since I could
6 make my needed changes at pdb_sql.c
7 Well after trying for a while I saw that I can't use crypt password
8 with this auth method but just nt password, lan manager password and
9 plain password (which one I'm using now).
10 The problem is that this database is used for such other things like
11 courier-imap and this one could support crypt passwords.
12 Looking around I saw that I could use crypt password with pam + mysql
13 and I decide to give it a try but I can't make pam to work.
14 Actually I think the problem is with passdb parameter wich one I don't
15 know what to put since I didn't seen any parameter that could match
16 pam.
17 I did try to comment passdb parameter but if I try it nor password
18 verification is done.
19
20 That's my pam.d/samba file where we can see I'm using plain password (crypt=0):
21 auth required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
22 db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
23 account required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
24 db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
25 password required pam_mysql.so user=USERNAME passwd=PASSWORD
26 host=LOCALHOST
27 db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
28 session required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
29 db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
30
31 what I want is to use crypt password with mysql. I don't know if is
32 there a way to do it without make more changes to passdb source code
33 or if I could pass some parameter identifying that I'm using pam
34 instead of other auth methods, so any suggestion would be appreciated.
35
36 Tks in advice,
37
38 Claudinei Matos
39
40 --
41 gentoo-server@g.o mailing list