The htpasswd command can be used to create, reset, and view a users password.
By default, the <web_server_root>/conf/admin.passwd file will be 0 bytes, like this.
-rw-r--r--. 1 root root 0 Mar 20 20:58 admin.passwd
In this example, john.doe's password is created. John Doe's password is "secret".
<web_server_root>/bin/htpasswd -b <web_server_root>/conf/admin.passwd john.doe secret
If the command is successful, the following should be displayed.
Adding password for user john.doe
Now, the admin.passwd file should be greater than 0 bytes. In this example, the file is 54 bytes, meaning the file contains data.
-rw-r--r--. 1 root root 54 Mar 20 21:54 admin.passwd
The following command can be used to ensure the users password is correct.
<web_server_root>/bin/htpasswd -vb <web_server_root>/conf/admin.passwd john.doe secret Password for user john.doe correct.