Strong problem with pam_mysql !

Hi
i am trying to authorize SSH useing mysql database . and i installed pam_mysql but its not working for me Strong problem with pam_mysql !

this is my pam sshd configuration :
#/etc/pam.d/sshd
#%PAM-1.0
auth sufficient pam_stack.so service=system-auth
auth required pam_nologin.so
account sufficient pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_loginuid.so

auth required pam_mysql.so host=127.0.0.1 user=root passwd= db=dbname table=main passwdcolumn=password usercolumn=username crypt=0

account required pam_mysql.so host=127.0.0.1 user=root passwd= db=dbname table=main passwdcolumn=password usercolumn=username crypt=0
RESULT :
1-when user exist in mysql database and not in passwd
Feb 13 11:58:16 localhost sshd(pam_unix)[3585]: check pass; user unknown
Feb 13 11:58:16 localhost sshd(pam_unix)[3585]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomain
2-when user exist in mysql and passwd BUT their password is different !
its working with both password !!!! mean i can login with mysql password and passwd for /etc/passwd ! but their password is different !


SO
i need a way that ssh check only mysql , now it first checking that if user exist then it working but i dont want this

thanks !

 

 

 

 

Top