Re: [gentoo-user] samba + mysql + crypt password (pam or passdb)?

2005-06-22 Thread Claudinei Matos
I did specified these lines at smb.conf:
encrypt passwords = no
obey pam restrictions = yes
pam password change = yes

and commented the line of passdb:
#passdb backend = mysql:teste

well, how I've said, if I do that setup and try to login samba try to
use guest account instead of authenticate me:
  Attempting to find an passdb backend to match guest (guest)
[2005/06/21 16:07:35, 5] passdb/pdb_interface.c:make_pdb_methods_name(669)
  Found pdb backend guest
[2005/06/21 16:07:35, 5] passdb/pdb_interface.c:make_pdb_methods_name(672)
  pdb backend guest has a valid init

since there's not a value to pass to passdb backend telling that I'm
using pam I don't know how to put pam to work.
I've tried passdb backend = smbpasswd but in this case samba try to
validate users into smbpasswd file which is not what I want.

Hope somebody could help me,

Claudinei Matos

On 6/21/05, Claudinei Matos [EMAIL PROTECTED] wrote:
 On 6/21/05, A. Khattri [EMAIL PROTECTED] wrote:
  On Tue, 21 Jun 2005, Claudinei Matos wrote:
 
   what I want is to use crypt password with mysql. I don't know if is
   there a way to do it without make more changes to passdb source code
   or if I could pass some parameter identifying that I'm using pam
   instead of other auth methods, so any suggestion would be appreciated.
 
  I am using libnss-mysql to do PAM auth out of a MySQL database. This way
  is transparent to any app doing PAM authentication. The only problem is
  you need to use openssl passwd -1 to generate the passwords (Im sure
  this could be scripted in Perl/PHP but I haven't had time to explore that
  yet).
 
 OK, but the problem is that I can't put samba to work with pam. If I
 try to use pam none authentication is done and samba try to use any
 other methods (pdb) and finish with pdb_guest wich one let the user
 join the domain but not have access to any non public share.
 
 tks anyway,
 
 claudinei matos


-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] samba + mysql + crypt password (pam or passdb)?

2005-06-21 Thread Claudinei Matos
hi guys,

I'm trying to use mysql with samba to authenticate users. The fist
thing I've tryed was passdb wich one is very useful except that I
can't personalize the querys but that's not a problem since I could
make my needed changes at pdb_sql.c
Well after trying for a while I saw that I can't use crypt password
with this auth method but just nt password, lan manager password and
plain password (which one I'm using now).
The problem is that this database is used for such other things like
courier-imap and this one could support crypt passwords.
Looking around I saw that I could use crypt password with pam + mysql
and I decide to give it a try but I can't make pam to work.
Actually I think the problem is with passdb parameter wich one I don't
know what to put since I didn't seen any parameter that could match
pam.
I did try to comment passdb parameter but if I try it nor password
verification is done.

That's my pam.d/samba file where we can see I'm using plain password (crypt=0):
auth required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
account required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
password required pam_mysql.so user=USERNAME passwd=PASSWORD
host=LOCALHOST
db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user
session required pam_mysql.so user=USERNAME passwd=PASSWORD host=LOCALHOST
db=DATABASE usercolumn=user_id crypt=0 passwdcolumn=password table=user 

what I want is to use crypt password with mysql. I don't know if is
there a way to do it without make more changes to passdb source code
or if I could pass some parameter identifying that I'm using pam
instead of other auth methods, so any suggestion would be appreciated.

Tks in advice,

Claudinei Matos

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] samba + mysql + crypt password (pam or passdb)?

2005-06-21 Thread A. Khattri
On Tue, 21 Jun 2005, Claudinei Matos wrote:

 what I want is to use crypt password with mysql. I don't know if is
 there a way to do it without make more changes to passdb source code
 or if I could pass some parameter identifying that I'm using pam
 instead of other auth methods, so any suggestion would be appreciated.

I am using libnss-mysql to do PAM auth out of a MySQL database. This way
is transparent to any app doing PAM authentication. The only problem is
you need to use openssl passwd -1 to generate the passwords (Im sure
this could be scripted in Perl/PHP but I haven't had time to explore that
yet).


-- 

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] samba + mysql + crypt password (pam or passdb)?

2005-06-21 Thread Claudinei Matos
On 6/21/05, A. Khattri [EMAIL PROTECTED] wrote:
 On Tue, 21 Jun 2005, Claudinei Matos wrote:
 
  what I want is to use crypt password with mysql. I don't know if is
  there a way to do it without make more changes to passdb source code
  or if I could pass some parameter identifying that I'm using pam
  instead of other auth methods, so any suggestion would be appreciated.
 
 I am using libnss-mysql to do PAM auth out of a MySQL database. This way
 is transparent to any app doing PAM authentication. The only problem is
 you need to use openssl passwd -1 to generate the passwords (Im sure
 this could be scripted in Perl/PHP but I haven't had time to explore that
 yet).
 
OK, but the problem is that I can't put samba to work with pam. If I
try to use pam none authentication is done and samba try to use any
other methods (pdb) and finish with pdb_guest wich one let the user
join the domain but not have access to any non public share.

tks anyway,

claudinei matos

-- 
gentoo-user@gentoo.org mailing list