Fix Passlib example in FAQ (#21997)
* Fixes passlib example in FAQ to reduce the number of rounds to 5000 As stated in issue #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. * Fixes passlib example in FAQ to reflect the API changes in passlib 1.7 Method encrypt() was deprecated in 1.7 and renamed to hash(), which happened almost a year ago. https://passlib.readthedocs.io/en/stable/lib/passlib.ifc.html#passlib.ifc.PasswordHash.encrypt
This commit is contained in:
parent
ae1a610482
commit
d6b40c935f
1 changed files with 1 additions and 1 deletions
|
@ -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).hash(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.
|
||||
|
|
Loading…
Reference in a new issue