LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-02-2011, 08:37 AM   #1
Zoner
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
pam_mysql_check_passwd() returning 6 - pam_mysql authentication issue


I'm having trouble with my pam_mysql authentication. I've double checked my md5 password but its correct.

What should I be looking at? My /etc/pam.d/system-auth is completely identical to my other server (that works), but this one is somehow reporting that my password is wrong.

I've bolded out the questionable output.

Here's my error log while trying to connect:

Code:
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option verbose is set to "1"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option db is set to "hidden"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option table is set to "hidden"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option usercolumn is set to "username"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option passwdcolumn is set to "password"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option crypt is set to "3"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - option md5 is set to "true"
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_close_db() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_sm_authenticate() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_open_db() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_open_db() returning 0.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_check_passwd() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_format_string() called
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_quick_escape() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - SELECT password FROM hidden WHERE username = 'hidden'
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_check_passwd() returning 6.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_sql_log() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_sql_log() returning 0.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_converse() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_open_db() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_check_passwd() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_format_string() called
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_quick_escape() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - SELECT password FROM hidden WHERE username = 'hidden'
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_check_passwd() returning 6.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_sql_log() called.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_mysql_sql_log() returning 0.
Aug  2 16:16:21 la2 sshd[8006]: pam_mysql - pam_sm_authenticate() returning 7.
Aug  2 16:16:23 la2 sshd[8006]: Failed password for invalid user hidden from ****** port ***** ssh2

For comparison, the following is what my working server is outputting for its authentication:

Code:
Aug  2 05:33:42 server1 sshd[18446]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=hidden  user=hidden
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option verbose is set to "1"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option db is set to "hidden"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option table is set to "hidden"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option usercolumn is set to "username"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option passwdcolumn is set to "password"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option crypt is set to "3"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - option md5 is set to "true"
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_close_db() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_sm_authenticate() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_open_db() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_open_db() returning 0.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_check_passwd() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_format_string() called
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_quick_escape() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - SELECT password FROM hidden WHERE username = 'hidden'
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_check_passwd() returning 0.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_sql_log() called.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_mysql_sql_log() returning 0.
Aug  2 05:33:42 server1 sshd[18446]: pam_mysql - pam_sm_authenticate() returning 0.
Aug  2 05:33:42 server1 sshd[18446]: pam_unix(sshd:account): account hidden has password changed in future
Aug  2 05:33:42 server1 sshd[18446]: Accepted password for hidden from 123.456.789.123 port 12345 ssh2
Aug  2 05:33:42 server1 sshd[18446]: pam_unix(sshd:session): session opened for user hidden by (uid=0)
 
Old 08-02-2011, 04:48 PM   #2
Zoner
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Still quite stumped!
 
Old 08-03-2011, 02:08 AM   #3
Zoner
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Bump
 
Old 08-03-2011, 02:21 AM   #4
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Quote:
sshd[8006]: pam_mysql - pam_mysql_check_passwd() returning 6
Are these users setup in /etc/passwd as well? If not this maybe your problem. ssh relies on a home directory and access variables as far as I know.

Also compare your /etc/pam.d/sshd files to the working server.

Last edited by micxz; 08-03-2011 at 02:22 AM.
 
  


Reply

Tags
pamauth, pamd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Enterprise 3 08-03-2007 10:27 AM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 1 06-14-2005 08:51 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 2 06-14-2005 03:49 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Programming 1 06-14-2005 09:18 AM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration