[Bug 150649] Re: gutsy does not have a working apache+mysql authentication solution
Daevid Vincent
daevid at daevid.com
Wed Feb 11 02:47:21 GMT 2009
I've been struggling with this in a brand new 8.10 server myself that I
just setup yesterday. Not sure how or why, but i got this magic
incantation to work (do note however, I'm storing the passwords in
plaintext in mySQL):
<Directory /home/dae51d/public_html/examples/crimson>
AuthName "CRiMson -- use: test/test1234"
AuthType Basic
require valid-user
AuthUserFile /dev/null
AuthBasicAuthoritative Off
# http://www.daevid.com/server-info#mod_auth_mysql.c
Auth_MYSQL On
Auth_MySQL_Host localhost
Auth_MySQL_User crimson_user
Auth_MySQL_Password crimson_password
Auth_MySQL_DB crimson_database
Auth_MySQL_Authoritative On
Auth_MySQL_Password_Table rep_table
Auth_MySQL_Encryption_Types Plaintext MySQL
Auth_MySQL_Encrypted_Passwords Off
Auth_MySQL_Empty_Passwords Off
Auth_MySQL_Username_Field rep_login
Auth_MySQL_Password_Field rep_password
</Directory>
But what I don't understand is when I do this one:
<Directory /home/reviewit/public_html/admin>
Options All +Includes
AllowOverride None
AuthName "SYMCELL Administration"
AuthType Basic
require valid-user
AuthUserFile /dev/null
AuthBasicAuthoritative Off
# http://www.daevid.com/server-info#mod_auth_mysql.c
Auth_MYSQL On
Auth_MySQL_Host localhost
Auth_MySQL_User reviewit_user
Auth_MySQL_Password reviewit_pass
Auth_MySQL_DB reviewit_db
Auth_MySQL_Authoritative On
Auth_MySQL_Password_Table users
Auth_MySQL_Encryption_Types SHA1Sum
Auth_MySQL_Encrypted_Passwords On
Auth_MySQL_Empty_Passwords Off
Auth_MySQL_Username_Field username
Auth_MySQL_Password_Field password
# Auth_MySQL_Where " type = 'Admin' AND enabled = 1 "
Auth_MySQL_Where " enabled = 1 "
</Directory>
Everything works except for the Auth_MySQL_Where part which says:
[Tue Feb 10 18:26:34 2009] [error] Query call failed: You have an error
in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'type = "Admin" AND
enabled = 1' at line 1 (1064)
But removing the " type = 'Admin'" then it works. I've tried reversing
the quotes. without any " on the ends. \'Admin\' and I can't figure out
the magic incantation.
Also, my mod_auth_mysql.c shows Auth_MySQL_Where as the directive, but
this page (http://modauthmysql.sourceforge.net/CONFIGURE) shows
AuthMySQLUserCondition and NO Auth_MySQL_Where...
Come on man! it's bad enough the directives keep changing slightly with
underscores and such with each version but now you don't even have the
same directive names. Is this project dead? it's v3.0.0 was on 2005-6-22
-- that's 3.5 YEARS ago! What pisses me off more is that this USED to
work with an older version of mod_auth_mysql I had on my Gentoo box
which was v3.0.0. And there is no current documentation that I've found
for the current apt-get version...
# dpkg -s libapache2-mod-auth-mysql
Package: libapache2-mod-auth-mysql
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 108
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: i386
Source: mod-auth-mysql
Version: 4.3.9-9
Depends: libc6 (>= 2.4), libmysqlclient15off (>= 5.0.27-1), apache2.2-common (>= 2.2.3-3)
Description: Apache 2 module for MySQL authentication
A module for the Apache 2 web server which enables HTTP authentication
against information stored in a MySQL database.
Original-Maintainer: Joey Schulze <joey at debian.org>
--
gutsy does not have a working apache+mysql authentication solution
https://bugs.launchpad.net/bugs/150649
You received this bug notification because you are a member of Ubuntu
Server Team, which is a direct subscriber.
More information about the Ubuntu-server-bugs
mailing list