htpasswd and openssl


htpasswd

xxx@xxx:~$ htpasswod -nbs <username> <password>
xxx@xxx:~$ htpasswd -nbs test test
test:{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=

openssl

xxx@xxx:~$ echo -n <password> | openssl dgst -sha1 -binary | openssl base64
xxx@xxx:~$ echo -n test | openssl dgst -sha1 -binary | openssl base64
qUqP5cyxm6YcTAhz05Hph5gvu9M=

online

Online password generation and encryption for .htpasswd files

  1. Put your <username> on “user name” field.
  2. Put your <password> on “password” field.
  3. Select “SHA-1 (Netscape-LDIF / Apache servers)” from algorithm combo box.
  4. Press “encrypt password” button.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s