Joined November 2013
·

Sam Briesemeister

Business Intelligence Continuous Delivery Consultant at Sendachi
·
Seattle, WA
·
·
·

Hello,

The crypt() function used for this effectively ignores characters beyond 8; you'll see this noted in Apache's documentation as well:
http://httpd.apache.org/docs/2.2/misc/password_encryptions.html

More securely:
$ printf "${username}:`openssl passwd -apr1`\n" >> .htpasswd

This also reads the password from STDIN via openssl, so it doesn't leave traces in shell history.

Achievements
80 Karma
0 Total ProTip Views