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
0
votes
0 answers

.htaccess allows everyone once first successful login

I'm trying to protect a single URI path. In the browser, it pops up the user / pass like normal. Once authenticated, any browser from any IP has access to that path. I'm not sure what I've got messed up. /var/www/path/to/site/.htaccess:
Bernard
  • 111
  • 4
0
votes
0 answers

htpasswd wont access the site even with the right credentials

Hi, I have this in my htaccess AuthUserFile /home/www/test/.htpasswd AuthType Basic AuthName "My restricted Area" Require valid-user this is my htpasswd file test:$apr1$y38eqctj$LVKOW1ywu4vNE2PDDP3CT1 as I try to access the page I get the password…
Cain Nuke
  • 2,843
  • 5
  • 42
  • 65
0
votes
1 answer

Flask authentication using htpassword with routes in seperate files

I'm working on updating an existing university department internal website to run using Flask. Before we completely release the project where it will use shibboleth to manage authentication, I've been trying to setup authentication for testing using…
0
votes
1 answer

Add basic auth (htpasswd) on the "index of" view but not on individual files

I have set up an FTP connection via ShareX to upload my screenshots to my own ftp. So my screenshots are accessible at the url 'screenshots.mydomain.fr/myscreenshothash.png'. And that's cool! But according to the url 'screenshots.mydomain.fr' you…
0
votes
1 answer

Protect files in folder on hosting linux using codeigniter php

Im doing a little application write in php with codeigniter hosted in hostinglinux i had no problems with create codeigniter interface with user login to access the application now i have a problem... i want to create some folder for the user to…
riccardo airone
  • 506
  • 1
  • 6
  • 21
0
votes
1 answer

Amazon Cloudfront and .htaccess/.htpasswd

I'm testing Amazon Cloudfront on a dev environment which is protected by .htaccess/.htpasswd. The password protection on the dev server is causing all of the cloudfront.net assets to be password protected as well. And no username/password…
0
votes
0 answers

How can client side JavaScript send a user id/password to an Apache server so that a folder protected by .htpasswd is unlocked?

I would like to give access to files in a folder to users that login to a web app that I made. The users login by entering an ID and a password that is checked against a database that is accessible using an API. Once they are authenticated they can…
Jonathan Elkins
  • 455
  • 5
  • 21
0
votes
0 answers

Trac: - htpasswd or ldap sets user to anonymous

This is a trac 1.4 install, using postgres as the DB, apache2 2.4 as the web server, running on Ubuntu 18 with Python 2.7 I'm converting a system from an earlier release of trac. THe problem was that when I signed onto trac with LDAP, I could get…
0
votes
0 answers

How to protect several domains with htpasswd by sharing the same credentials?

I have 4 websites : 1 "root" domain : tooliphone.net 3 sub-domains, one for each "app/service" : iempty.tooliphone.net, icustom.tooliphone.net and iskin.tooliphone.net Today, I'd like to duplicate these 4 websites to create a "beta testing"…
0
votes
1 answer

Is there a module to manipulate an htdigest password file in Perl?

I operate a small development cluster and repository system for a couple of open-source project groups to use. I run these systems on a volunteer basis. Recently, people have expressed concern at the repository system using basic authentication to…
Kai
  • 1
0
votes
1 answer

Ionic GET request to backend protected by an htpasswd

I need to get data from my backend with a get request but the backend is protected by an htpasswd. So my backend return Unauthorized what is the best way to send my credential to the backend and how to store them safely ? …
0
votes
1 answer

htpasswd file and NGINX

The site is using php 5.6.40 FPM by NGINX on Centos 7.8.2033 - Plesk Onyx 17.8.11 The site is hosted on https://boutique.domaine.fr The admin console can be accessed through : https://https://boutique.domaine.fr/admin I used by the past Apache…
YDA
  • 1
  • 1
0
votes
0 answers

Basic Auth not working if FilesMatch is in place

I am having a strange issue where if the is set the basic auth does NOT work. If I comment out the , the basic authentication works. I replaced the ips for now with 1.1.1.1 #htaccess authentication AuthType Basic AuthName…
Victor
  • 63
  • 5
0
votes
1 answer

Can't password protect specific url in CodeIgniter

I need to protect a specific route/url with password on my codeigniter site. Base url looks like this: https://staging.mysite.com/site-name I want to protect this url with a password using…
failedCoder
  • 1,346
  • 1
  • 14
  • 38
0
votes
0 answers

500 error opening FTP-page with .htaccess

I made a HTML webpage with .htaccess and .htpasswd to provide password protection. If I open the URL via FTP it asks for a password(as it should). If the password is correct, it should navigate me to the specified index.html page, however it starts…
barbara_ko
  • 53
  • 6