# How to generate hashes

**URL:** <https://forum.search-guard.com/t/how-to-generate-hashes/2491>\
**Category:** Search Guard\
**Created:** [February 13, 2024, 10:37am UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491 "2024-02-13T10:37:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeorgeBouras](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@GeorgeBouras](https://forum.search-guard.com/u/GeorgeBouras)\
**Post date:** [February 13, 2024, 10:37am UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491/1 "2024-02-13T10:37:59Z")

</div>

hello,  
At the old search-guard there was the hash utility to generate hashes e.g tools/hash.sh -p SomePass  
Do you know how do I have the same fuctionality at flx ?  
I know that I can put the password at REST api but I want to avoid it  
Thanks, George Bouras

---

<div class="post-metadata">

**Author:** ![mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@mantas](https://forum.search-guard.com/u/mantas)\
**Post date:** [February 13, 2024, 11:14am UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491/2 "2024-02-13T11:14:17Z")

</div>

Hi @GeorgeBouras,

Search Guard uses a BCrypt hash for the passwords, so you can use [any tool that is capable of producing a BCrypt hash](https://bcrypt-generator.com/).

Best,  
Mantas

---

<div class="post-metadata">

**Author:** ![GeorgeBouras](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@GeorgeBouras](https://forum.search-guard.com/u/GeorgeBouras)\
**Post date:** [February 13, 2024, 11:26am UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491/3 "2024-02-13T11:26:37Z")

</div>

the following is working thanks !

htpasswd -bnBC 10 “” “SomePass” | tr -d ‘:\n’

---

<div class="post-metadata">

**Author:** ![mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@mantas](https://forum.search-guard.com/u/mantas)\
**Post date:** [February 21, 2024, 4:46pm UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491/4 "2024-02-21T16:46:29Z")

</div>

HI @GeorgeBouras,

You can also use `sgctl` to update internal user passwords or create new internal users :  
i.e password update:  
` ./sgctl.sh update-user <userName> --password <newPassword> --cert <path/to/your/superuser/cert.pem> --key <path/to/your/superuser/key.key> --ca-cert <path/to/your/root-ca.pem> -h <hostname>`

Please see more here:

> **[Adding users](https://docs.search-guard.com/latest/first-steps-user-configuration#using-sgctl-to-directly-add-users-on-the-cluster)**
>
> How to add new Search Guard users by using sgctl and the Search Guard configuration.

Let me know if you have any further questions:

Best,  
Mantas

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/system/32/1870_2.png) [@system](https://forum.search-guard.com/u/system)\
**Post date:** [March 13, 2024, 4:46pm UTC](https://forum.search-guard.com/t/how-to-generate-hashes/2491/5 "2024-03-13T16:46:44Z")

</div>

Closed on March 13, 2024, 4:46pm UTC

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
