Skip to content

htpasswd file management

Basic actions

Install nessecary package:

sudo apt-get install apache2-utils

Creates a new file if the file does not exist and stores a record in it for user admin (all other users are ereased):

htpasswd -c .htpasswd admin

Adds or modifies the password for user admin in an existing file:

htpasswd .htpasswd admin