LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache and Password Protect Folders (https://www.linuxquestions.org/questions/linux-software-2/apache-and-password-protect-folders-711242/)

adrianc.grigoras 03-13-2009 01:19 AM

Apache and Password Protect Folders
 
I configured apache to protect my entire site.

I have some users into .htaccess, that was generated by a web generator and they work.

I try to create others, with htpasswd utility, and they don't work. Also I found a lot of htpasswd generators on the net, but the encripted password is different from one to another. What is the right algorithm for crypting?

Thank you

SkyEye 03-13-2009 02:09 AM

htpasswd utility usually use the md5 or a system defined function to encrypt the password. However I do not think this is your problem. You rarely (if not never) have to worry about the algorithm used. I think it must be something in your configuration.

If you have other htpasswd prgrams installed you might want to replace them with the original version. And double check if use used the command correctly

Eg 1: htpasswd -c /etc/httpd/conf/website-users adrianc
The command will create a website-users file and add the credentials of the new user adrianc to the file

Eg 2: htpasswd /etc/httpd/conf/website-users skyeye
Note that -c is omitted from this command, because now what we want is just to add a user, not to create the password file again.

In the same way you can modify passwords (-m) or delete users (-D)

I cant be entirely sure, but I'm pretty positive you might have forgotten to specify the path to the password file when using the htpasswd command. You can find the path to the password file in the .htaccess file with the AuthUserFile directive.


All times are GMT -5. The time now is 06:30 AM.