R
R
RSV2013-01-24 12:23:06
linux
RSV, 2013-01-24 12:23:06

How to check the password for its presence in the htpasswd file?

There is an htpasswd file for basic user authorization using Apache.
There is a username and password entered by the user.
It is necessary to check if there is a hash in this file that corresponds to this entered name and password.
You need to check this either using PHP. Or some third-party utility that can be run from php.
I tried to simply generate a hash based on the entered password to compare it with what is in the file, but the hash is always different.
Just enable the standard basic authorization, there is no way through .htaccess.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RSV, 2013-01-25
@RSV

There is a project on wordpress, in which you need to close posts with a certain category.
At the request of the customer, you need to close it through basic authorization, since the system issuing access can only work with htpasswd.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question