Last active
December 17, 2015 19:19
-
-
Save ozuma/5659786 to your computer and use it in GitHub Desktop.
Create Apache htpasswd (encoded with MD5/SHA1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create File | |
## Default | |
$ htpasswd -c .htpasswd guest | |
$ htpasswd -d -c .htpasswd guest # 最近のは-dが必要 | |
# cryptはパスワード8文字 | |
New password: | |
Re-type new password: | |
Adding password for user guest | |
$ cat .htpasswd | |
guest:AB5mCJkOABnpY | |
## MD5 | |
$ htpasswd -m -c .htpasswd guest | |
New password: | |
Re-type new password: | |
Adding password for user guest | |
$ cat .htpasswd | |
guest:$apr1$...../..$O4..../..............1 | |
## SHA | |
$ htpasswd -s -c .htpasswd guest | |
New password: | |
Re-type new password: | |
Adding password for user guest | |
$ cat .htpasswd | |
guest:{SHA}NWd..............Q/E......A= | |
$ htpasswd -s -n guest | |
New password: | |
Re-type new password: | |
guest:{SHA}NWd..............Q/E......A= | |
$ vi .htpasswd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment