How to assign multiple passwords to the same user in .htaccess password protection?
It looks like this in my .pass file, but only the first one is working
christina:o5hZ6Uplugq.2
christina:uaZOUG6BzJaUc
How to assign multiple passwords to the same user in .htaccess password protection?
It looks like this in my .pass file, but only the first one is working
christina:o5hZ6Uplugq.2
christina:uaZOUG6BzJaUc
We can see the source code of the http authenticator in the apache httpd here:
https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/aaa/mod_auth_basic.c
In the function get_basic_auth()
and in authenticate_basic_users()
we can clearly see, that the interpretation of the .htaccess file happens in two steps:
.htpasswd
describing the actual userIf I interpret the code well, n case of duplicated users, only the first line will have any sense.
Of course you can reach this if you want, but you have to extend this source file a little bit. Or, what is more feasible, you have to use some other type of authentication. For example, an authentication against a database backend may or may not have this additional feature as well. Google for "apache authentication ldap" or some like so, if you wish.