Questions tagged [.htpasswd]

.htpasswd is a flat-file used to store usernames and password for basic authentication of Apache HTTP Server.

.htpasswd is a flat-file used to store usernames and passwords for basic authentication on Apache HTTP Servers. The name of the file is given in the .htaccess configuration, and can be anything, but ".htpasswd" is the canonical name. The file name starts with a dot, because most Unix-like operating systems consider any file that begins with dot to be hidden.

This file is often maintained with the shell command htpasswd which can add, delete, and update users, and will properly encode the passwords for use (so they are easily checked, but cannot be reversed back to the original password).

The file consists of rows. Each row corresponds to a username and hashed password pair, separated with the colon. For example:

user:password

The hashed password is typically "UNIX crypt" style, encrypted in either MD5 or SHA1 as common alternatives.

Additional users can be added by using the htpasswd shell command or by appending new lines to the file. For example:

user1:password1
user2:password2

Resources available on the Apache HTTP server can be restricted to users listed in the files created by htpasswd.

See also

526 questions
1
vote
1 answer

Authentication multiple files

So rather than excluding one file from the entire authentication like I tried to here. I've just decided to add specific files to the authentication like this: The thing is when it's like this:
Charlie Yabben
  • 307
  • 2
  • 7
  • 13
1
vote
1 answer

How can I debug htpasswd access?

I have a site hosted on hostgator that I've set up with a directory to use htaccess/htpasswd for authentication. It's working fine but only for a user named test. Here's the relevant htaccess AuthType Basic AuthName…
T. Markle
  • 897
  • 8
  • 15
1
vote
1 answer

Restrict HTML files access

I have a portal with Login Authentication and after the user login to the website we are providing few links to the HTML files. This works perfect. My concern is User's are able to access the HTML files without logging to the portal. I will not be…
1
vote
1 answer

.htaccess and .htpasswd ignore subfolders

I want to ignore folders on my website, but as I often create subfolders on it, I want to ignore subfolders too. Here's my .htaccess : AuthType Basic AuthName "Auth Required" AuthUserFile ".htpasswd location" Require valid-user SetEnvIf Request_URI…
AkdM
  • 15
  • 3
1
vote
1 answer

How to set up htaccess and htpasswd in my private server?

At the moment I'm trying set up authentication on my test server. The following is the list of files in the folder I'm trying to set up authentication…
Szuturon
  • 931
  • 4
  • 17
  • 28
1
vote
1 answer

how to use Oracle's dbms crypto to create htpasswd compatible passwords

Is there any way to use Oracles DBMS_CRYPTO PL/SQL package to create passwords that are compatible with apache's htpasswd? So in a PL/SQL package I create a hashed password which when later stored in an .htpasswd file, will work fine. We…
1
vote
3 answers

Protect a file with .htaccess and .htpasswd

I'm having some troubles configuring the .htaccess file to protect the access of a file. The file to protect is: www.mydomain.com/admin/stats.php I put the .htaccess file into the www.mydomain.com/admin folder with the following code: AuthName…
Nicolaesse
  • 2,554
  • 12
  • 46
  • 71
1
vote
2 answers

How to change SVN user password by himself

We have local SVN repo over Apache location with WebDAV. Our passwords are stored in passwd file using htpasswd command. In this situation only admin can add/change/assign a password to user using sudo htpasswd /etc/subversion/passwd…
radistao
  • 14,889
  • 11
  • 66
  • 92
1
vote
1 answer

htaccess - only index requires valid-user

I've got a simple htaccess set up with which I only want to protect my index.php file. I wrote down the following which seems the most logic, but it just tells me 401 Authorization Required. If I open up the link WITH index.php, it does prompt me…
Manuel
  • 130
  • 2
  • 8
0
votes
0 answers

htpasswd on wordpress

Im trying to develop a web page based on wordpress, i have done many localy, but want try make the production on the cloud, but want close page access with .htpasswd. I read a lot of articles, and im follow this steps: Insatlling wordpress..etc At…
ruudy
  • 491
  • 2
  • 8
  • 21
0
votes
1 answer

persistant 403 error even with no htaccess file

I made a directory secure via htacces and htpasswd. Then I wanted to take off the password, so I deleted the .ht* files, and now it's throwing up 403 errors. I have cleared cashe and tried to open it on multiple other machines, still 403's. Why is…
Neros
  • 1,139
  • 3
  • 14
  • 22
0
votes
1 answer

htpaswrd vs cPanel password protection

I've been comparing a tool called Coffee Cup Website Access Mangaer, which generates htpaswrd files and assists in multi user management, against cPanel's password protection functionality. With the cPanel functionality, when accessing the…
toomanyairmiles
  • 6,465
  • 8
  • 43
  • 71
0
votes
1 answer

PHP: fopen to check whether client has authenticated with a password protected file (htpasswd)

Say I have a directory protected using htpasswd called /secret A valid user logs into /secret. They are redirected back to a public area. From within that public area, is there a way within PHP to know whether the current user has authenticated with…
Globalz
  • 4,474
  • 6
  • 34
  • 43
0
votes
2 answers

Password Protect Static Page AppEngine HowTo?

So I'm working with AppEngine (Python) and what I want to do is to provide OpenID Login setting a Default provider so the user can Log-In without problems using that provider. The thing is, I want to prompt the user a Password right after they login…
Jmlevick
  • 6,504
  • 9
  • 29
  • 35
0
votes
1 answer

Protect Codeigniter application during development

How can I protect my webapp build with Codeigniter with a htpasswd during development? I tried this but I get 500 error. AuthType Basic AuthName "Authenticate please" AuthUserFile /usr/html/.htpasswd Require valid-user RewriteEngine on RewriteCond…
Jonathan Clark
  • 19,726
  • 29
  • 111
  • 175