From 22cc142ffd09ee74882104e3813470bedc48a564 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 18 Dec 2016 17:12:43 -0800 Subject: document ZNC setup --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 00191eb..0cf5ef4 100644 --- a/README.md +++ b/README.md @@ -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 section of your config with this: + + Method = sha256 + Hash = 310c5f99825e80d5b1d663a0a993b8701255f16b2f6056f335ba6e3e720e57ed + Salt = YdlPM5yjBmc/;JO6cfL5 + + [ ** ] 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:]))' -- cgit v1.2.3