Add CLI script for hashing LDAP passwords
Only takes a cleartext password and outputs a salted, hashed password string for LDAP documents.
This commit is contained in:
parent
9ba364ad7a
commit
b63c86b37f
|
@ -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