Skip to content

Commit

Permalink
Fixes passlib example in FAQ to reduce the number of rounds to 5000
Browse files Browse the repository at this point in the history
As stated in issue ansible#15326, the default number for glibc is 5000, where
the default for passlib is 656000.

I actually found out when I spend few hours trying to understand why
ansible was taking almost x3 the time to run a playbook when using a
user with sudo and password (comparared to sudo with NOPASSWD set).
Well, it was because the user was created using ansible and the passlib
example found in the docs' FAQ.

Reducing the numbers of rounds to 5000 will ensure a better experience
with ansible for newcomers when using sudo with a password.
  • Loading branch information
pgrenaud committed Feb 27, 2017
1 parent a1047e6 commit e5ab340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docsite/rst/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Once the library is ready, SHA512 password values can then be generated as follo

.. code-block:: shell-session
python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())"
python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.using(rounds=5000).encrypt(getpass.getpass())"
Use the integrated :ref:`hash_filters` to generate a hashed version of a password.
You shouldn't put plaintext passwords in your playbook or host_vars; instead, use :doc:`playbooks_vault` to encrypt sensitive data.
Expand Down

0 comments on commit e5ab340

Please sign in to comment.