FreeKB - htpasswd command (view create reset password)
IBM IHS Web Server - htpasswd command (view create reset password)

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.


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 0daa0 in the box below so that we can be sure you are a human.