Created
June 15, 2022 16:26
-
-
Save asaf400/34bc4f3e5848012c5968dd7b96f33f29 to your computer and use it in GitHub Desktop.
Aerospike security.smd user&password stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install bcrypt | |
python3 -c 'import bcrypt; print(bcrypt.hashpw(b"PASSWORD", bcrypt.gensalt(rounds=10)).decode("ascii"))' | |
htpasswd -bnBC 10 "" password | tr -d ':\n' | sed 's/$2y/$2a/' | |
aerospike_users=cat security.smd | jq '.[] | select(has("key")? and (.key | contains("|P"))) | .key | sub("\\|P"; "")' -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment