Tagged: htpasswd

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.

vsftpd with virtual users and htpasswd


I followed some great links. But couldn’t help but spend few hours for htpasswd problem.
http://www.ubuntututorials.net/installing-vsftpd-using-text-file-for-virtual-users/
http://howto.gumph.org/content/setup-virtual-users-and-directories-in-vsftpd/

With my Ubuntu 11.10 box, I ought to use -d option with htpasswd otherwise you’ll get 503 error.

$ sudo htpasswod -d /path/to/file <username>