marderh.blog

27/12/2007

Debian Etch & Apache2 MySQL Authentication

Filed under: — stefan @ 1:25 pm

debian bottle

*AARRGGHHHH*

Jo eh, ich ja ned der erste der draufkommt, dass libapache-mod-auth-mysql/libapache2-mod-auth-mysql unter Debian Etch fehlt (siehe hier an der Quelle). Einfach futsch. Ein grosses Nix zwischen den Einträgen für Sarge und Lenny. Schaut so aus, wie wenn der Maintainer die Schmerzen nicht mehr ertragen konnte:


I don’t run any Apache servers any more, and I’m sick of the whole Apache module mess. Note to any potential adopters: you’re upstream as well, you’ve got a mess of a codebase, and the Apache2 module is supposedly being replaced with something native to Apache 2.2.

(zitiert aus dem Bugreport)

Versteh ich, aber trotzdem unschön für mich.

Also was tun?

Nach ein bisschen Recherche finden sich 3 Möglichkeiten:

    mod_auth_pam verwenden und über libpam-mysql authentifizieren (Debian preferred way).
    Scheidet für mich aus, weil mich persönlich Herumgetue mit PAM meistens schmerzt, auch wenns dann manchmal überraschend fein tut. Zusätzlich halt ichs für unschön www-data zur Gruppe shadow hinzuzufügen. Genaueres gibts hier.
    mod_dbd & mod_authn_dbd (Apache preferred way)
    Ist aber eher pfui, weils da Lizenzprobleme gibt und der MySql-Treiber nicht inkludiert ist und mensch dann ja sowieso das alte Modul (mod_auth_mysql) neu übersetzen kann (s.u.). Ein HowTo für diese Variante (incl.MySql-Treiber) findet sich hier.
    mod_auth_mysql selber kompilieren
    Hat erstmal fein funktioniert. Allerdings authentifiziert da nix (im besten Fall) oder es verabschiedet sich der Apache (im Schlechteren). Wieder herumgesucht und über diesen Ubuntu-Bugreport gestolpert. Speziell die letzten beiden Einträge sind hilfreich. Vor allem jener von Mrts (Vielen Dank dafür!!!):

    $ wget mod_auth_mysql-3.0.0.tar.gz
    $ wget mod_auth_mysql-3.0.0-apache-2.2.3.patch
    $ tar zxf mod_auth_mysql-3.0.0.tar.gz
    $ apt-get install apache2-prefork-dev libmysqlclient15-dev
    $ cd mod_auth_mysql-3.0.0
    $ patch < ../mod_auth_mysql-3.0.0-apache-2.2.3.patch
    $ sed -i ’s|#include <mysql.h>|#include <mysql/mysql.h>|’ mod_auth_mysql.c
    $ apxs2 -c -lmysqlclient -lm -lz mod_auth_mysql.c
    $ apxs2 -i mod_auth_mysql.la
    $ echo ‘LoadModule mysql_auth_module /usr/lib/apache2/modules/mod_auth_mysql.so’ >/etc/apache2/mods-available/auth_mysql.load
    $ a2enmod auth_mysql

:) *Jumps around && is happy*

9/11/2005

Debian im produktiven Umfeld

Filed under: — stefan @ 3:46 pm

ist natürlich fein zu verwenden.

[Gefunden via Zugschlusbeobachtungen]


[...]
There is absolutely no possibility of us going bust, changing business
strategy, deciding to sue the known universe or any of the other annoying
things that software vendors are prone to do, because we’re not doing this
for the money, and I doubt there is anything anybody could do to stop most
of the people involved in Debian from doing what they’re doing.

Rest der Mail von Phil Hands

Powered by WordPress