{"action":"created","issue":{"url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/8","labels_url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/8/comments","events_url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/8/events","html_url":"https://github.com/rlidwka/sinopia-htpasswd/issues/8","id":56932039,"number":8,"title":"htpasswd from apache2 generates other hashes than sinopia/npm-adduser","user":{"login":"rondonjon","id":8258823,"avatar_url":"https://avatars.githubusercontent.com/u/8258823?v=3","gravatar_id":"","url":"https://api.github.com/users/rondonjon","html_url":"https://github.com/rondonjon","followers_url":"https://api.github.com/users/rondonjon/followers","following_url":"https://api.github.com/users/rondonjon/following{/other_user}","gists_url":"https://api.github.com/users/rondonjon/gists{/gist_id}","starred_url":"https://api.github.com/users/rondonjon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rondonjon/subscriptions","organizations_url":"https://api.github.com/users/rondonjon/orgs","repos_url":"https://api.github.com/users/rondonjon/repos","events_url":"https://api.github.com/users/rondonjon/events{/privacy}","received_events_url":"https://api.github.com/users/rondonjon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-08T00:13:36Z","updated_at":"2015-02-08T12:36:36Z","closed_at":null,"body":"When I use htpasswd from the apache2 distribution to add a user to the file on the command line (is this not how it's meant, despite the name?) an entry like the following is created:\r\n\r\nuser1:$apr1$pnQSEnhe$AIwFNEA6xOecE7l0/mTeh.\r\n\r\nThis entry does NOT work in the authentication; the request is denied.\r\n\r\nAfter setting max_users > 0 in config.yaml and creating another user with npm/adduser, an entry with a longer hash has been added:\r\n\r\nuser2:$6$zAsH+/KRfsOzgw==$LGzgf.I8ctW/day/J6AjZoe8sH5FaznwFb3bR9AEdbCDTojAjul/ZTzN2u95n1dc/m1057SHqHxleZ2DpOI.s.:autocreated 2015-02-08T00:03:45.226Z\r\n\r\nDo the tools possibly use different hash algorithms? How should I add an entry to the htpasswd file from the command line if not using the htpasswd tool?"},"comment":{"url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/comments/73409050","html_url":"https://github.com/rlidwka/sinopia-htpasswd/issues/8#issuecomment-73409050","issue_url":"https://api.github.com/repos/rlidwka/sinopia-htpasswd/issues/8","id":73409050,"user":{"login":"rlidwka","id":999113,"avatar_url":"https://avatars.githubusercontent.com/u/999113?v=3","gravatar_id":"","url":"https://api.github.com/users/rlidwka","html_url":"https://github.com/rlidwka","followers_url":"https://api.github.com/users/rlidwka/followers","following_url":"https://api.github.com/users/rlidwka/following{/other_user}","gists_url":"https://api.github.com/users/rlidwka/gists{/gist_id}","starred_url":"https://api.github.com/users/rlidwka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlidwka/subscriptions","organizations_url":"https://api.github.com/users/rlidwka/orgs","repos_url":"https://api.github.com/users/rlidwka/repos","events_url":"https://api.github.com/users/rlidwka/events{/privacy}","received_events_url":"https://api.github.com/users/rlidwka/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T12:36:36Z","updated_at":"2015-02-08T12:36:36Z","body":"They are different. Apr1 is apache-specific crypto function based on md5, and sinopia's implementation is a standard crypt(3). We created it for compatibility with nginx, not apache.\r\n\r\nYou can use SHA or CRYPT (`-d` and `-s` options for htpasswd). Their implementation is the same, but they are considered insecure.\r\n\r\nBetter idea would be to use `mkpasswd --method=sha-512` instead of `htpasswd`."}}