I am trying to setup "users" file, with username:password.
What is exactly the hash algo to use? I tried bcrypt from Php / Ansible (Python 3) or even online with https://bcrypt-generator.com/ , this never work .
The bcrypt implementation is compatible with other implementations. Specifically, it is compatible with Python and whatever used for https://bcrypt-generator.com
For example, the following works in Python (hash value copied from users file):
The above works for https://bcrypt-generator.com as well. Note you need to choose Decrypt for checking. Bcrypt generates different hash each time for the same password because it uses salt to prevent rainbow table attack.
That online bcrypt generator is using a non-standard format.
$2y$ is a commonly used, but non-standard, prefix that was decided on by a number of tools to work around previous bugs in their implementations. We currently only accept the standard, canonical prefix of $2a$
We're likely to change our implementation to support $2y$ in order to be more compatible, but it's not a priority.
However, putting all of that aside, we don't support generating your own users file. We provide a tool and that is the only supported way to manage those files.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.