Auth-mysql unter Debian/etch

Aus Bennys Wiki
Wechseln zu: Navigation, Suche


you can now enjoy my recycle bin section with the same user account of this blog! the user accounts authentication of drupal and apache is now shared within MySQL, by using mod_auth_mysqll!

by using this method:

1. you can create your user account as you like 2. i will have the right to keep trace who are using my service 3. account handling are all integrated with drupal, so i can administrate all of this by using drupal interface!

finally find the solution for mod_auth_mysql under apache2.2 and Debian testing: compile from source. here is a quick howto:

1.
apt-get install apache2-prefork-dev libmysqlclient15-dev

2. get this two files:

http://edin.no-ip.com/html/files/mod_auth_mysql-3.0.0.tar.gz
http://edin.no-ip.com/html/files/apache22.diff

if the site does not work here are the mirrored files

http://www.bennyshome.de/files/mod_auth_mysql-3.0.0.tar.gz
http://www.bennyshome.de/files/apache22.diff
3.
tar xzf mod_auth_mysql-3.0.0.tar.gz
mv apache22.diff mod_auth_mysql-3.0.0/
cd mod_auth_mysql-3.0.0
patch -p1 <apache22.diff
4.
apxs2 -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
5.
apxs2 -i mod_auth_mysql.la
6.
echo "LoadModule mysql_auth_module /usr/lib/apache2/modules/mod_auth_mysql.so" > /etc/apache2/mods-available/auth_mysql.load
a2enmod auth_mysql

7. edit .htaccess according to http://modauthmysql.sourceforge.net/CONFIGURE, here is my example, which integrated with drupal authentication system:

      AuthType Basic
      AuthBasicAuthoritative Off
      AuthName "CHAMGEME"
      AuthGroupFile /dev/null
      AuthUserFile /dev/null
      AuthMySQLEnable On
      AuthMySQLHost localhost
      AuthMySQLUser CHAMGEME
      AuthMySQLPassword CHAMGEME
      AuthMySQLDB CHAMGEME
      AuthMySQLUserTable users
      AuthMySQLUserCondition "users.status = 1"
      AuthMySQLNameField name
      AuthMySQLPasswordField pass
      AuthMySQLNoPasswd Off
      AuthMySQLPwEncryption md5
      AuthMySQLAuthoritative On
      require valid-user

http://www.vhcs.net/new/modules/newbb/viewtopic.php?topic_id=5028&start=...

20070317: some bug fix, so check if user have login once (which means they pass the checking and successfully login, their account is not valid): AuthMySQLUserCondition "users.status = 1 AND users.access <> 0"


Die Originalseite ist hier http://edin.no-ip.com/html/?q=successfully_configure_mod_auth_mysql_3_0_0_apache2_2_debian_testing_source zu finden - aber recht laaaangsaaaam