Skip to main content

Nagios plugin to report LDAP users locked by the ppolicy overlay

Project description

check_ldap_ppolicy_lockout

Overview

This is Nagios plugin to check for LDAP accounts, which have been locked by the ppolicy overlay due to too many failed login attempts.

Installation

Best install the plugin in a virtual environment, e.g.:

python -m venv /usr/local/lib/check_ldap_ppolicy_lockout
. /usr/local/lib/check_ldap_ppolicy_lockout/bin/activate
pip install check_ldap_ppolicy_lockout
ln -s $(which check_ldap_ppolicy_lockout) /usr/lib/nagios/plugins/check_ldap_ppolicy_lockout

Configuration

Configuration is loaded from ~/.check_ldap_ppolicy_lockout.yaml or as fallback from /etc/check_ldap_ppolicy_lockout.yaml. This behaviour may be overruled via the -f command line option. The following parameters are supported with the defaults shown for the optional parameters:

alarms:
  warning: 1
  critical: 5
  expire_seconds: 600
ldap:
  uri: ldap://localhost  # Required
  binddn: cn=nagios,ou=services,dc=example,dc=com  # Required
  bindpw: xxx  # Required
  tls: true
  tls_ca_file: /etc/ssl/certs/ldap_ca.crt  # Required if ldap.tls is true
  users_base_dn: ou=users,dc=example,dc=com  # Required

Usage

usage: check_ldap_ppolicy_lockout [-h] [-f CONFIG_FILE] [-w WARNING] [-c CRITICAL] [-e EXPIRE_SECONDS]

Check for user accounts locked by LDAP ppolicy overlay

options:
  -h, --help            show this help message and exit
  -f, --config-file CONFIG_FILE
                        Path to configuration file
  -w, --warning WARNING
                        Number of locked users to trigger warning (Default 1).
  -c, --critical CRITICAL
                        Number of locked users to trigger critical alert (Default 5)
  -e, --expire-seconds EXPIRE_SECONDS
                        Seconds after which locks expire (Default 300 - should match your ppolicy lockout-time)```

## Remarks

For AD installations a plugin check_ldap_lockout seems to exist, see also:

* https://nagios.fm4dd.com/plugins/manual/check_ldap_lockout.shtm

A first check suggests that this plugin does not support TLS,
which does not allow an easy adaptation for modern setups.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

check_ldap_ppolicy_lockout-0.1.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file check_ldap_ppolicy_lockout-0.1.0.tar.gz.

File metadata

  • Download URL: check_ldap_ppolicy_lockout-0.1.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.5 Linux/6.12.57+deb13-amd64

File hashes

Hashes for check_ldap_ppolicy_lockout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 889ba7f985f168e5d0702eb682cb6d90d6f7233cc30a8b8235f39ed6ee164d7b
MD5 8e28fbedbaf3b536239cd8f0bb8276fd
BLAKE2b-256 d65f72cf242165fee5547d076c1bdf7809400cfe02effeac89257b47df39c552

See more details on using hashes here.

File details

Details for the file check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d63dd50741c8f9d1dda95e1b36255fcea38f81ff3db54a9aa2eb58617b439ad1
MD5 d72d81f75484072e61183793296212e6
BLAKE2b-256 70b5d4a162e5411e1be00dd760818fb6b70ea76a947126e22b34c73cab84aaf1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page