LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-30-2010, 05:26 PM   #1
dhugh
LQ Newbie
 
Registered: Jun 2006
Posts: 8

Rep: Reputation: 2
Question auth_mysql 3.0.0.0 w/ slackware 12.2 failing to validate user


Slackware ver 12.2
Mysqld Ver 5.0.67
Apache/2.2.16
mod_auth_mysql-3.0.0 patched with apache22.diff

Symptom: when trying to use mod_auth_mysql to validate access to a directory via mysql DB, get prompted for user name and password but never find user and password combination despite using good values for login to mysql (same values in apache directory statements work as a cli login to mysql) and confirmed as valid in the user_info table (see values supplied to prompt in select * from user_info). Mysql general log does not show any attempt to access, strace does not show any attempt to setup local connection to mysql port. In a working version in Fedora I setup to test do see access described in the general log and strace shows a setup to mysql port. No useful messages in slackware apache access_log, error_log, mysql error logs, system logs.

Have tried many combinations of mysqld variables, apache variables, mod_auth_mysql versions and variables, to no avail. Reinstalled apache, mysqld, etc. Anyone have this working with slackware 12.2? If so, can you give me a simple example (for a simple mind)??
 
Old 08-31-2010, 02:08 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

IIRC for apache 2.2 you need:
Code:
AuthBasicAuthoritative  Off
AuthUserFile /dev/null
If that doesn't work post the whole .htaccess, so we can help you.

Regards
 
Old 08-31-2010, 11:29 PM   #3
dhugh
LQ Newbie
 
Registered: Jun 2006
Posts: 8

Original Poster
Rep: Reputation: 2
More detail, hope this helps

*** This evening's fun

Upgraded spare server to slackware 13.1

Incuded are:
mysql-5.1.46-i486-2
httpd-2.2.16-i486-1_slack13.1

Still not working


**** Loading mod_auth

From CLI

wget http://sourceforgnet/projects/modaut....tar.gzownload

wget http://www.bleb.o/software/mod_auth_...he-2.2.3.patch

patch -p0 mod_auth_myl.c mod_auth_mysql-3.0.0-apache-2.2.3.patch

apxs -c -L/usr/lib/mys -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c

apxs -i mod_auth_mysql.la

-- Edit into httpd.conf
LoadModule mysql_auth_module lib/httpd/modules/mod_auth_mysql.so


***** SQL

CREATE DATABASE auth;
USE auth;
CREATE TABLE users (
user_name CHAR(30) NOT NULL,
user_passwd CHAR(20) NOT NULL,
PRIMARY KEY (user_name)
);
GRANT SELECT
ON auth.users
TO authuser@localhost
IDENTIFIED BY 'PaSsW0Rd';

INSERT INTO users VALUES ('testuser', 'testpass');



**** HTTP


Alias /testsql "/srv/httpd/htdocs/testsql"
<Directory /srv/httpd/htdocs/testsql>
AuthName "MySQL authenticated zone"
AuthType Basic
AuthMySQLAuthoritative Off
AuthUserFile /dev/null
AuthMYSQLEnable on
AuthMySQLUser authuser
AuthMySQLPassword PaSsW0Rd
AuthMySQLDB auth
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
AuthMySQLPwEncryption none
require valid-user
</Directory>



--- Message in httpd/error_log when trying to enter testuser, testpass x 3

[Wed Sep 01 00:21:29 2010] [error] [client 192.168.1.102] user testuser not found: /testsql
[Wed Sep 01 00:21:34 2010] [error] [client 192.168.1.102] user testuser not found: /testsql
[Wed Sep 01 00:21:39 2010] [error] [client 192.168.1.102] user testuser not found: /testsql
 
Old 09-01-2010, 02:11 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Note it's:
Code:
AuthBasicAuthoritative  Off
not
Quote:
AuthMySQLAuthoritative Off
I had the same problem (i.e. apache was not even connecting to mysql) and it was solved by adding that "AuthBasicAuthoritative Off" directive

Regards
 
Old 09-01-2010, 09:01 AM   #5
dhugh
LQ Newbie
 
Registered: Jun 2006
Posts: 8

Original Poster
Rep: Reputation: 2
Talking

Great catch, thank you thank you thank you!!!! Now works after making that one change.
 
  


Reply



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
Slackware 12.1 Installation Failing Edmontom Linux - Newbie 3 05-04-2008 01:56 PM
User Accounts Authentication Failing... HELP! nanohead Fedora 5 11-06-2006 08:57 AM
Wvdial failing on ioctl call as regular user mugwump84 Linux - Software 3 11-27-2005 01:01 PM
vsftpd 2.0.3 ftp authentication failing for local user scooger Linux - Software 1 05-17-2005 10:48 AM
Failing to 'make' wine 20040505 on slackware 9.1 raela Linux - Software 0 06-15-2004 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration