Add CLI script for hashing LDAP passwords #239
5
scripts/ldap/hash_pw.sh
Executable file
5
scripts/ldap/hash_pw.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
password=$(ruby -r base64 -r digest -r securerandom -e "salt = SecureRandom.hex(32); password = '$1'; puts '{SSHA512}' + Base64.strict_encode64(Digest::SHA512.digest(password + salt) + salt)");
|
||||
|
||||
echo $password;
|
Loading…
Reference in New Issue
Block a user