Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-13-2009, 01:19 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 14

Rep: Reputation: 0
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
Old 03-13-2009, 02:09 AM   #2
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
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.

Last edited by SkyEye; 03-13-2009 at 02:12 AM. Reason: Added about the AuthUserFile


apache, htaccess

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Password protect web folders dilemma rectospander Linux - Server 2 07-19-2007 02:28 AM
Password protect apache home directories paul_mat Linux - Networking 3 04-28-2006 12:36 AM
LXer: Password protect your website in Apache webserver LXer Syndicated Linux News 0 02-25-2006 09:16 AM
Apache 2.0, I want to list dir contents & password protect... Scrag Linux - Software 3 02-10-2005 11:38 AM
How do I password protect folders/files? shodekiagari Linux - Software 6 12-04-2004 12:16 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration