md5 .htaccess mod_auth_mysql
md5 .htaccess mod_auth_mysql
Hallo,
Ich habe nen Rootie von 1und1 und möchte gerne dass ich auch die Funktion mod_auth_mysql nutzen kann.
Hierzu habe ich in der httpd.conf die Einträge:
LoadModule mysql_auth_module /usr/lib/apache/mod_auth_mysql.so
AddModule mod_auth_mysql.c
erstellt.
Ich habe dann eine .htaccess erstellt mit folgendem Inhalt:
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLEncryptionTypes MySQL
AuthMySQLCryptedPasswords On
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xyz
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
<LIMIT GET POST>
require valid-user
</LIMIT>
<files ".ht*">
Deny from All
</files>
Leider bekomme ich wenn ich auf die Seite zugreifen will dann nen Error 500. Meine pwd's sind in der DB mit MD5 verschlüsselt.
Muss ich da noch ein andere Modul mit einbinden?
Gruß
Tobias
Ich habe nen Rootie von 1und1 und möchte gerne dass ich auch die Funktion mod_auth_mysql nutzen kann.
Hierzu habe ich in der httpd.conf die Einträge:
LoadModule mysql_auth_module /usr/lib/apache/mod_auth_mysql.so
AddModule mod_auth_mysql.c
erstellt.
Ich habe dann eine .htaccess erstellt mit folgendem Inhalt:
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLEncryptionTypes MySQL
AuthMySQLCryptedPasswords On
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xyz
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
<LIMIT GET POST>
require valid-user
</LIMIT>
<files ".ht*">
Deny from All
</files>
Leider bekomme ich wenn ich auf die Seite zugreifen will dann nen Error 500. Meine pwd's sind in der DB mit MD5 verschlüsselt.
Muss ich da noch ein andere Modul mit einbinden?
Gruß
Tobias
Re: md5 .htaccess mod_auth_mysql
Hallo
Ich habe im Ã?brigen die apache-contrib-1.0.9-809 installiert.
Bekomme aber in den error Logs die Fehlermeldung:
[Thu Mar 4 10:54:12 2004] [alert] [client 145.254.212.64] /home/www/web1/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'Auth_MySQL_DB', perhaps mis-spelled or defined by a module not included in the server configuration
phpinfo() sagt mir folgendes:
Loaded Modules mod_ssl, mod_php4, mod_perl, mod_setenvif, mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest, mod_auth_db, mod_auth_dbm, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_auth_mysql, mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_referer, mod_log_agent, mod_log_config, mod_define, mod_env, mod_vhost_alias, mod_mmap_static, http_core
gruß
Tobias
Ich habe im Ã?brigen die apache-contrib-1.0.9-809 installiert.
Bekomme aber in den error Logs die Fehlermeldung:
[Thu Mar 4 10:54:12 2004] [alert] [client 145.254.212.64] /home/www/web1/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'Auth_MySQL_DB', perhaps mis-spelled or defined by a module not included in the server configuration
phpinfo() sagt mir folgendes:
Loaded Modules mod_ssl, mod_php4, mod_perl, mod_setenvif, mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest, mod_auth_db, mod_auth_dbm, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_auth_mysql, mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_referer, mod_log_agent, mod_log_config, mod_define, mod_env, mod_vhost_alias, mod_mmap_static, http_core
gruß
Tobias
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
Wenn Du MD5 mit dem Mod nutzen willst, musst Du folgendes hinzufügen:
AuthMySQLMD5PasswordField On
Und du solltest dafür das CryptedPasswords rausnehmen. das ist glaub ich nur wenn die Password mit dem encrypt befehl kodiert sind.
greets
Sven
AuthMySQLMD5PasswordField On
Und du solltest dafür das CryptedPasswords rausnehmen. das ist glaub ich nur wenn die Password mit dem encrypt befehl kodiert sind.
greets
Sven
Re: md5 .htaccess mod_auth_mysql
Hallo,
Ich habe aber noch das Gefühl, das diese Modul zwar angezeigt wird das es geladen wurde aber tatsächlich nicht geladen ist.
Wie kann ich das herausfinden und dann das Modul laden lassen?
Muss ich den Apache neu bilden lassen?
Habe gelesen das es irgenwie mit apxs (DSO) gehen sollte. Habe das aber noch nie gemacht.
Gruß
Tobias
Ich habe aber noch das Gefühl, das diese Modul zwar angezeigt wird das es geladen wurde aber tatsächlich nicht geladen ist.
Wie kann ich das herausfinden und dann das Modul laden lassen?
Muss ich den Apache neu bilden lassen?
Habe gelesen das es irgenwie mit apxs (DSO) gehen sollte. Habe das aber noch nie gemacht.
Gruß
Tobias
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
was bekommst Du denn wenn Du das configure aufrufst?
sh ./configure --with-mysql=/PFADZUMYSQL/mysql/ --with-apache=/PFADZUMAPACHE/apache/ --includedir=/INCLUDEPFAD/apache/
Dann gibt er dir ja normalerweise Statusmeldungen aus.
Wenn Du Dir nicht sicher bist, probier es doch erstmal ohne Verschlüsselung mit einer Testtabelle. Das sollte funzen.
Oder restarte mal den Apache und guck dann ins error log, der sollte Dir dann ne Fehlermeldung ausgeben, wenn Dein Modul nicht korrekt geladen wird.
greets
Sven
sh ./configure --with-mysql=/PFADZUMYSQL/mysql/ --with-apache=/PFADZUMAPACHE/apache/ --includedir=/INCLUDEPFAD/apache/
Dann gibt er dir ja normalerweise Statusmeldungen aus.
Wenn Du Dir nicht sicher bist, probier es doch erstmal ohne Verschlüsselung mit einer Testtabelle. Das sollte funzen.
Oder restarte mal den Apache und guck dann ins error log, der sollte Dir dann ne Fehlermeldung ausgeben, wenn Dein Modul nicht korrekt geladen wird.
greets
Sven
Re: md5 .htaccess mod_auth_mysql
Doch ist geladen. Aber es gibt keine Directive 'Auth_MySQL_DB'. Diese Fehlermeldung ist allerdings etwas seltsam, da in der .htaccess ja auch nicht drin 'Auth_MySQL_DB' steht, sondern nur 'AuthMySQLDB' was auch so stimmt...
Re: md5 .htaccess mod_auth_mysql
Hallo,
folgendes habe ich festgestellt:
Nachdem ich den Befehl:
sh ./configure --with-mysql=/usr/lib/mysql/ --with-apache=/usr/lib/apache/ --includedir=/usr/include/apache/
aufgeführt habe erhielt ich leider nur dies:
./configure: ./configure: No such file or directory
Ich habe die .htaccess file nocheinmal neu geschrieben mit dem Inhalt:
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLCryptedPasswords Off
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xxx
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
<LIMIT GET POST>
require valid-user
</LIMIT>
<files ".ht*">
Deny from All
</files>
Nun funktioniert der Zugriff auf die DB aber nur unverschlüsselt.
Wie bekomme ich denn nun die MD5 verschlüsselung rein?
Sobald ich diese Zeile einfüge
AuthMySQLMD5PasswordField On
erhalte ich wieder die Error 500 Seite!
Gruß
Tobias
folgendes habe ich festgestellt:
Nachdem ich den Befehl:
sh ./configure --with-mysql=/usr/lib/mysql/ --with-apache=/usr/lib/apache/ --includedir=/usr/include/apache/
aufgeführt habe erhielt ich leider nur dies:
./configure: ./configure: No such file or directory
Ich habe die .htaccess file nocheinmal neu geschrieben mit dem Inhalt:
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLCryptedPasswords Off
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xxx
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
<LIMIT GET POST>
require valid-user
</LIMIT>
<files ".ht*">
Deny from All
</files>
Nun funktioniert der Zugriff auf die DB aber nur unverschlüsselt.
Wie bekomme ich denn nun die MD5 verschlüsselung rein?
Sobald ich diese Zeile einfüge
AuthMySQLMD5PasswordField On
erhalte ich wieder die Error 500 Seite!
Gruß
Tobias
Re: md5 .htaccess mod_auth_mysql
Das muss heißen:
Windancer hat eine falsche Syntax geschrieben.
Code: Select all
AuthMySQLMD5Passwords On
Last edited by oxygen on 2004-03-04 14:13, edited 2 times in total.
Re: md5 .htaccess mod_auth_mysql
Wie finde ich den heraus welche Befehle ich alles in die .htaccess schreiben darf?
Dieser Befehl führt nämlich auch zu einer error 500 seite.
Auth_MySQL_Encryption_Types MD5
Tobias
Dieser Befehl führt nämlich auch zu einer error 500 seite.
Auth_MySQL_Encryption_Types MD5
Tobias
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
schmeiss mal das crypted ganz raus. Das habe ich garnicht in meiner Config stehen.
mal zum vergleich meine config:
Greets
Sven
mal zum vergleich meine config:
Das Condition kannst Du weglassen. Das ist nur dafür da wenn Du eine Zusatzbedingung abfragen willst. In meinem Fall hat meine Tabelle eine Spalt disable, die definiert, ob eine User aktiv ist oder deaktiviert ist.AuthName "SECURE AREA"
AuthType Basic
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLDB mysqltabelle
AuthMySQLUserTable usertabelle
require valid-user
AuthMySQLUser mysqluser
AuthMySQLPassword mysqlpasswort
AuthMySQLNameField usernamefeld
AuthMySQLPasswordField passwordfeld
AuthMySQLMD5Passwords On
AuthMySQLUserCondition disable=0
Greets
Sven
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
Hi
Auch diese bringt mir eine error 500 Seite
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLCryptedPasswords On
AuthMySQLScrambledPasswords Off
AuthMySQLMD5Passwords On
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xxx
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
In der Logfile steht:
[Thu Mar 4 14:13:22 2004] [alert] [client 62.104.212.66] /home/www/webx/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'AuthMySQLScrambledPasswords', perhaps mis-spelled or defined by a module not included in the server configuration
Auch diese bringt mir eine error 500 Seite
AuthType Basic
AuthName "Secure Login"
AuthMySQLHost localhost
AuthMySQLCryptedPasswords On
AuthMySQLScrambledPasswords Off
AuthMySQLMD5Passwords On
AuthMySQLDB usr_webx_3
AuthMySQLUser webx
AuthMySQLPassword xxx
AuthMySQLUserTable pfadi_terminverw_user
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLKeepAlive Off
In der Logfile steht:
[Thu Mar 4 14:13:22 2004] [alert] [client 62.104.212.66] /home/www/webx/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'AuthMySQLScrambledPasswords', perhaps mis-spelled or defined by a module not included in the server configuration
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
auch mit meiner vorgeschlagenen Config?
Im Endeffekt willst Du ja das gleiche machen wie ich.
Im Endeffekt willst Du ja das gleiche machen wie ich.
Re: md5 .htaccess mod_auth_mysql
Also meine Config sieht genauso aus:
Nur pwd rausgemacht:
AuthName "SECURE AREA"
AuthType Basic
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLDB usr_web1_3
AuthMySQLUserTable pfadi_terminverw_user
require valid-user
AuthMySQLUser web1
AuthMySQLPassword xxx
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLMD5Passwords On
AuthMySQLUserCondition disable=0
Bekomme leider immernoch die Errorseite.
Logfile:
[Thu Mar 4 14:20:44 2004] [alert] [client 62.104.212.66] /home/www/web1/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'AuthMySQLMD5Passwords', perhaps mis-spelled or defined by a module not included in the server configuration
Tobias
Nur pwd rausgemacht:
AuthName "SECURE AREA"
AuthType Basic
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLDB usr_web1_3
AuthMySQLUserTable pfadi_terminverw_user
require valid-user
AuthMySQLUser web1
AuthMySQLPassword xxx
AuthMySQLNameField user
AuthMySQLPasswordField password
AuthMySQLMD5Passwords On
AuthMySQLUserCondition disable=0
Bekomme leider immernoch die Errorseite.
Logfile:
[Thu Mar 4 14:20:44 2004] [alert] [client 62.104.212.66] /home/www/web1/html/php/demo/termine/admin/upload/.htaccess: Invalid command 'AuthMySQLMD5Passwords', perhaps mis-spelled or defined by a module not included in the server configuration
Tobias
Re: md5 .htaccess mod_auth_mysql
Welche Version von mod_mysql_auth hast du? Verschüsselung ohne linken von OpenSSL wird noch nicht so lange unterstützt. Siehe News:
Removed the dependency on OpenSSL for MD5 support, since it turns out Apache's API already has MD5 functions!
(2003-05-10)
Re: md5 .htaccess mod_auth_mysql
Kann ich dir nur sagen, wenn du mir sagst wie ich das herausfinden kann.
Ich habe es mit dem apache-contrib-1.0.9-809 zusammen installiert.
Gruß
Tobias
Ich habe es mit dem apache-contrib-1.0.9-809 zusammen installiert.
Gruß
Tobias
Re: md5 .htaccess mod_auth_mysql
Also ich habe nun die Version
mod_auth_mysql.tgz vom 20030320 installiert.
Welche verwendest du denn?
Gruß
Tobias
mod_auth_mysql.tgz vom 20030320 installiert.
Welche verwendest du denn?
Gruß
Tobias
-
winddancer
- Posts: 8
- Joined: 2004-03-04 12:18
Re: md5 .htaccess mod_auth_mysql
also ich habe die 2.95.3 Release laufen. Die müsste sogar noch aus 2001 sein.
Ich vermute Du hast die letzte Release installiert hast.
Siehe sourceforge (http://sourceforge.net/project/showfile ... e_id=23555)
in der Release ist auch ne Readme und ne Usage Datei drin.
Da müssten alle Optionen aufgeführt sein!
Auth_MySQL_Encryption_Types Crypt_MD5
müsste es lauten....
Ich vermute Du hast die letzte Release installiert hast.
Siehe sourceforge (http://sourceforge.net/project/showfile ... e_id=23555)
in der Release ist auch ne Readme und ne Usage Datei drin.
Da müssten alle Optionen aufgeführt sein!
hat sich also etwas geändert...Auth_MySQL_Encryption_Types [Plaintext, Crypt_DES, Crypt_MD5, MySQL]
This directive tells the authentication module which encryption type(s)
to use. It overrides the Auth_MySQL_Scrambled_Passwords and
Auth_MySQL_Encrypted_Passwords directives if it appears after them.
More than one encryption type may be specified, to instruct the module to
check each password through more than one encryption scheme. For example,
Auth_MySQL_Encryption_Types Plaintext Crypt_DES
will instruct the module to check each password both as-is, and through
DES crypt.
Auth_MySQL_Encrypted_Passwords on/off
Whether or not to use standard UNIX DES encrypted passwords. If turned
on, the module expects the password field to contain standard UNIX DES
encrypted passwords (2 bytes salt plus 11 bytes encrypted data). If
turned off, the passwords are expected to be plaintext, unless
Auth_MySQL_Scrambled_Passwords is turned on. Use of this directive
is not encouraged - use Auth_MySQL_Encryption_Types instead.
Default: On.
Auth_MySQL_Scrambled_Passwords on/off
Whether or not to use passwords scrambled with MySQL's password() routine.
If turned on, the module expects the password field to contain standard
passwords encrypted with the SQL password() function in MySQL. If turned
off, the passwords are expected to be plaintext, unless
Auth_MySQL_Encrypted_Passwords is turned on. Use of this directive is
not encouraged - use Auth_MySQL_Encryption_Types instead. Default: Off.
Auth_MySQL_Encryption_Types Crypt_MD5
müsste es lauten....
Re: md5 .htaccess mod_auth_mysql
Installier besser die aktuelle, geht schnell und problemlos.
Windancer: Das ist die Version vom GCC und nicht mod_mysql_auth.
Windancer: Das ist die Version vom GCC und nicht mod_mysql_auth.
Re: md5 .htaccess mod_auth_mysql
Hi
Vielen Dank für Eure Hilfe.
Hat nun alles funktioniert.
Gruß
Tobias
Vielen Dank für Eure Hilfe.
Hat nun alles funktioniert.
Gruß
Tobias