Skip to content

Instantly share code, notes, and snippets.

@asaf400
Created June 15, 2022 16:26
Show Gist options
  • Save asaf400/34bc4f3e5848012c5968dd7b96f33f29 to your computer and use it in GitHub Desktop.
Save asaf400/34bc4f3e5848012c5968dd7b96f33f29 to your computer and use it in GitHub Desktop.
Aerospike security.smd user&password stuff
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