This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Cracklib password policy plugin for LdapCherry

Doc:Documentation on ReadTheDoc
Dev:Source code on GitHub
PyPI:Package on Pypi
Author:Pierre-Francois Carpentier - copyright © 2015


From pypi:

pip install lcppolicy_cracklib

From sources:

$ python install


Enable module

To enable this module, set ppolicy.module to lcppolicy_cracklib in section [ppolicy] of ldapcherry.ini


This plugin takes the following parameters in ldapcherry.ini (all the parameters are optional):

Parameter Section Description Values Comment
min_length ppolicy Minimum length of password integer Default: 0
min_upper ppolicy Minimum number of upper case characters Integer Default: 0
min_digit ppolicy Minimum number of digit characters Integer Default: 0
min_lower ppolicy Minimum number of lower case characters Integer Default: 0
min_other ppolicy Minimum number of non alphanumeric characters Integer Default: 0
dict_path ppolicy Path to dictionary Path

Default: default cracklib dictionary usually ‘/var/cache/cracklib/cracklib_dict’.

If pointing, for example, to /path/dict, then /path/dict.hwm, /path/dict.pwd and /path/dict.pwi must exist.



# password policy module
ppolicy.module = 'lcppolicy_cracklib'
# minimum password length (optional default: 0)
min_length = 10
# minimum number of upper case characters (optional default: 0)
min_upper = 1
# minimum number of lower case characters (optional default: 0)
min_lower = 2
# minimum number of digits (optional default: 0)
min_digit = 1
# minimum number of non alphanumeric characters (optional default: 0)
min_other = 1
# path to dictionary (optional)
dict_path = '/var/cache/cracklib/cracklib_dict'

Custom dictionary

To build custom cracklib dictionaries:

  • Get one or many word list files (for example here:
  • If necessary, encode it to UTF-8.
  • Generate the cracklib dictionary.


# Just create a work directory
$ mkdir dict/
$ cd dict/

# Recover and unzip the word list
$ wget
$ unzip

# UTF-8 encoding
$ file *
fr.dic: Little-endian UTF-16 Unicode text
fr.txt: ASCII text, with CRLF line terminators Zip archive data, at least v2.0 to extract
$ iconv -f UTF-16 -t UTF-8 fr.dic >fr2.dic

# Create the dictionary
$ cat fr2.dic | cracklib-packer mydict

# Result
$ ls mydict*
mydict.hwm  mydict.pwd  mydict.pwi


Most distributions already provide dictionaries and a cron script to update cracklib dictionary (see ‘apt-cache search ‘dictionary’ | egrep ‘^w’’ and ‘/etc/cron.daily/cracklib-runtime’ in Debian/Ubuntu for example)

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lcppolicy_cracklib-0.1.0.tar.gz (189.4 kB) Copy SHA256 Checksum SHA256 Source Nov 4, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting