S
S
ShadowMoon2016-04-14 06:09:16
Apache HTTP Server
ShadowMoon, 2016-04-14 06:09:16

Apache HTTP Authorization and MYSQL?

Good afternoon, since mod_auth_mysql is not available in debian 8, I switched to the mod_dbd module and ran into a problem, the fact is that the passwords in the database are stored in the form MYSQL5 which can be obtained by mysql using the password('mypassword') function and we get *9F6981D098CBDA7D03E2E98FC4F5C5B912525150 . during authorization, I can’t get access to the directory, but if I use unencrypted passwords in the table, let’s say “123” or “qwert”, then authorization goes without problems, tell me where to dig to make it work with encrypted passwords.
my request in the config looks like this:
AuthDBDUserPWQuery "SELECT ENCRYPT(password) AS password FROM users WHERE login =%s "
maybe I didn't include some directive????
ps config itself
AuthName "Private Area"
AuthBasicProvider dbd
AuthDBDUserPWQuery "SELECT ENCRYPT(password) AS password FROM users WHERE login =%s "
Require valid-user
Thanks in advance for your help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShadowMoon, 2016-04-15
@ShadowMoon

I wrote a script that is responsible for authorization, I decided not to take out my brain and did everything on the side of the programming language. so, yes, such crutches will only do harm later)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question