diff options
| -rw-r--r-- | README.md | 27 | 
1 files changed, 27 insertions, 0 deletions
| @@ -17,3 +17,30 @@ Example playbook call:  Run a single role (helpful for dev):      ansible-playbook -i hosts playbooks/init_adze.yml --vault-password-file=vault_pass.txt -t nginx + +===== IRC Setup + +How to set up the IRC password hash… + +    # znc --makepass +    [ ** ] Type your new password. +    [ ?? ] Enter Password: foo +    [ ?? ] Confirm Password: foo +    [ ** ] Kill ZNC process, if it's running. +    [ ** ] Then replace password in the <User> section of your config with this: +    <Pass password> +            Method = sha256 +            Hash = 310c5f99825e80d5b1d663a0a993b8701255f16b2f6056f335ba6e3e720e57ed +            Salt = YdlPM5yjBmc/;JO6cfL5 +    </Pass> +    [ ** ] After that start ZNC again, and you should be able to login with the new password. + +Take the strings after `Hash =` and `Salt =` and insert them as the value for `irc_password_hash` and `irc_password_salt` respectively. + +Alternatively, if you don’t already have `znc` installed, Python 3.3 or higher on Linux will generate the appropriate string for you (assuming your password is `password`): + +    python3 -c 'import crypt; print("irc_password_salt: {}\nirc_password_hash: {}".format(*crypt.crypt("password", salt=crypt.METHOD_SHA256).split("$")[2:]))' + +On OS X and other platforms the passlib:https://pythonhosted.org/passlib/ package may be used to generate the required string: + +    python -c 'import passlib.hash; print("irc_password_salt: {}\nirc_password_hash: {}".format(*passlib.hash.sha256_crypt.encrypt("password", rounds=5000).split("$")[2:]))' | 
