Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: htpasswd seems to create password hashes which httpd cannot match. Version-Release number of selected component (if applicable): httpd.x86_64 0:2.4.4-2.fc18 httpd-tools.x86_64 0:2.4.4-2.fc18 mod_ssl.x86_64 1:2.4.4-2.fc18 How reproducible: always Steps to Reproduce: 1. Configure httpd directory for simple access control: <Directory "/var/www/html/snoopy"> Options None AllowOverride None AuthName "Snoopy Access" AuthType Basic AuthBasicProvider file AuthUserFile /etc/httpd/passwd Require valid-user </Directory> 2. Create the password file: htpasswd -c /etc/httpd/passwd user 3. Try accessing the url http://localhost/snoopy with the user and password from #2 Actual results: The browser (firefox) will ask for authentication for "Snoopy Access", but all attempts to enter the right password will fail. There will be messages in /var/log/httpd/error_log about "password mismatch". Expected results: The browser should be able to display the page after entering the same credentials as created in the passwd file with htpasswd. Additional info: This same sequence works if I downgrade to the latest non-testing releases of these packages: httpd-2.4.3-12.fc18.x86_64 httpd-tools-2.4.3-12.fc18.x86_64 mod_ssl-2.4.3-12.fc18.x86_64 After updating to the newer versions, authentication still works. However, after modifying or recreating the passwd file with the upgraded htpasswd, authentication no longer works. That's what suggests to me that the htpasswd algorithm has somehow changed. I have mostly tested the MD5 hash, but I have tried others like SHA and plain text those did not work either. Interestingly, a plain text password with earlier versions of htpasswd are actually readable, eg: shiraz|109|% htpasswd -p -c passwd granger Warning: storing passwords as plain text might just not work on this platform. New password: Re-type new password: Adding password for user granger shiraz|110|% cat passwd granger:test Whereas the same command and password with the 2.4.3-12 htpasswd produces this: [root@snoopy httpd]# cat passwd test:`6G�� Perhaps this is some change in handling text encoding or something?
I added a link to the Apache patch which probably fixes this.
A bug in htpasswd command has been fixed in apache 2.4.5, see: https://issues.apache.org/bugzilla/show_bug.cgi?id=54735 This resolves the "password mismatch" issue. Would it be possible to have it applied on the Fedora package? That bug is really annoying.
httpd-2.4.4-3.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/httpd-2.4.4-3.fc18
Package httpd-2.4.4-3.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing httpd-2.4.4-3.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-8577/httpd-2.4.4-3.fc18 then log in and leave karma (feedback).
httpd-2.4.4-6.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/httpd-2.4.4-6.fc19
httpd-2.4.4-3.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
httpd-2.4.4-6.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.