apache/htpasswd

Create Password File

Create password protected directory

security
authentication

Command

sudo htpasswd -c /etc/apache2/.htpasswd username

Explanation

Creates or updates password file for basic authentication.

Examples

Create new password file

sudo htpasswd -c /etc/apache2/.htpasswd username

Add another user

sudo htpasswd /etc/apache2/.htpasswd anotheruser