Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pam_sm_authenticate() returning 3. the return :( #67

Closed
ph1823 opened this issue Sep 5, 2020 · 2 comments
Closed

pam_sm_authenticate() returning 3. the return :( #67

ph1823 opened this issue Sep 5, 2020 · 2 comments

Comments

@ph1823
Copy link

ph1823 commented Sep 5, 2020

Hello ! Here I am again :( I had to install a vSTFPD server with pam-mysq, but this time on debian. I had a bit of trouble, with several errors, but I got there.

Except that here, I checked the connection, as well as the MySQL identifier (maybe not as it should be), and all the information entered in the pam_mysql configuration, allows me to connect with PMA or even in command line.

But there, pam_sm_authenticate returns the number 3. I dont know why, i search, but i dont find.

My config:

#%PAM-1.0
auth		sufficient	pam_mysql.so verbose=1 user=datahosting passwd=secret_password host=localhost db=dh table=ftpusers usercolumn=username passwdcolumn=password crypt=sha256
account		sufficient	pam_mysql.so verbose=1 user=datahosting passwd=secret_password host=localhost db=dh table=ftpusers usercolumn=username passwdcolumn=password crypt=sha256
auth        sufficient     pam_unix.so try_first_pass nullok
account     sufficient       pam_unix.so
session    required     pam_loginuid.so

My log (from auth.log):

Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option verbose is set to "1"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option user is set to "datahosting"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option passwd is set to "secret_password "
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option host is set to "localhost"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option db is set to "dh"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option table is set to "ftpusers"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option usercolumn is set to "username"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - option passwdcolumn is set to "password"
Sep  5 15:46:30 datahosting vsftpd: pam_mysql - pam_sm_authenticate() returning 3.
Sep  5 15:46:30 datahosting vsftpd: pam_unix(vsftpd:auth): check pass; user unknown
Sep  5 15:46:30 datahosting vsftpd: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty=ftp ruser=datahosting_minecraft rhost=90.30.212.74 
Sep  5 15:46:32 datahosting sshd[526]: Connection closed by 71.6.232.6 port 55904 [preauth]
Sep  5 15:46:32 datahosting vsftpd: pam_mysql - pam_mysql_release_ctx() called.
Sep  5 15:46:32 datahosting vsftpd: pam_mysql - pam_mysql_destroy_ctx() called.
Sep  5 15:46:32 datahosting vsftpd: pam_mysql - pam_mysql_close_db() called.

My database structure:
Image of structure database

I see "check pass; user unknown" in the log, but in my database, user exist. Where does the problem come from? Thank for help me!

Edit:
After enable all mysqllog, i see when I connect from my phpmyadmin, the log file has fill by log of connection, but when a try to connect on ftp (with valid user and password) no log appears, idk if this will help you with my worries
And i try edit pam_mysql.c for add syslog, but that doest work :( Idk how to update this file for more log :/

Edit 2: if i reinstall with make and make isntall, and not remove and reinstall libpam-mysql i get this error:

rted vsftpd FTP server.
Sep 06 11:17:17 datahosting vsftpd[29964]: PAM unable to dlopen(pam_mysql.so): /lib/security/pam_mysql.so: undefined symbol: compat_make_scrambled_password_323
Sep 06 11:17:17 datahosting vsftpd[29964]: PAM adding faulty module: pam_mysql.so
@kyrian666
Copy link
Contributor

Might want to try rebuilding against the updated patched code being discussed in issue 65 as this sounds like it's related to that error. No idea how you managed to get it working as far as this tbh.

@NigelCunningham
Copy link
Owner

Since there's been no reply, I'll assume this ticket can be closed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants