$npx skillfedfor your agent

python-pam

Python PAM module using ctypes, py3

With conditionsPyPI SecurityReleased Mar 20222.3M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_pam-2.0.2-py3-none-any.whl
v2.0.2 · released 2022-03-18

Yes, if you need to authenticate against Linux system credentials and are comfortable with the privilege model and platform constraints. The package is mature, permissively licensed, has no dependencies, and carries no known vulnerabilities. The 1610-day gap since last release is notable but not disqualifying given the stable nature of PAM itself; verify that ctypes bindings remain compatible with your target systems before deploying.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Linux/POSIX system only (not Windows).
  • Requires PAM libraries installed on the system.
  • Privilege constraints apply: without root, you can only authenticate the current user; with root, you can authenticate any user.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

last release 2022-03-18 (1610 days) · last repo commit 2026-08-10 · 119 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,335,539 downloads/mo, #3,128 on PyPI

Verify before relying

pip install python-pam

import pam
p = pam.authenticate()
result = p.authenticate('username', 'password')
print(result)  # True if successful, False otherwise
  • Whether the package works with modern Python versions beyond 3.9 (classifiers list Python 2 and 3 generically)
  • Current state of ctypes bindings compatibility with recent glibc/PAM versions
  • Whether the 1610-day gap since last release indicates maintenance concerns or stable maturity
Same gist for agents: .md · .json

What it is and what it does

python-pam is a ctypes-based wrapper around the Linux PAM (Pluggable Authentication Modules) library, allowing Python code to authenticate users against system credentials. It exposes PAM's authentication flow through a simple API: create an authenticator object, call authenticate() with a username and password, and receive a boolean result plus error codes and reason strings.

The package is designed for system administration and security-focused applications that need to verify user credentials against the system's authentication stack (typically /etc/shadow via pam_unix.so). It has no external runtime dependencies and runs on any Linux/POSIX system with PAM installed. Authentication is subject to privilege constraints: unprivileged code can only verify the current user's credentials, while privileged (root) code can verify any user.

Use it for

  • Authenticate users in a Python web application or service against system accounts without reimplementing password verification
  • Build system administration tools that need to verify user credentials as part of access control logic
  • Integrate PAM authentication into Python-based login or privilege-escalation workflows
  • Verify user identity in containerized or virtualized environments where system PAM is available
  • Test PAM service configurations programmatically by authenticating against different PAM services

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to authenticate against Linux system credentials and are comfortable with the privilege model and platform constraints.

The package is mature, permissively licensed, has no dependencies, and carries no known vulnerabilities. The 1610-day gap since last release is notable but not disqualifying given the stable nature of PAM itself; verify that ctypes bindings remain compatible with your target systems before deploying.

Install

python-pam on PyPI

Before you install

Low install friction with no runtime dependencies. Marked as mature and actively maintained with recent commits, though last release was in 2022.

Linux/POSIX system only (not Windows). Requires PAM libraries installed on the system. Privilege constraints apply: without root, you can only authenticate the current user; with root, you can authenticate any user.

License in practice

MIT license (permissive) — you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Quickstart

pip install python-pam

import pam
p = pam.authenticate()
result = p.authenticate('username', 'password')
print(result)  # True if successful, False otherwise

Verify before relying

  • Whether the package works with modern Python versions beyond 3.9 (classifiers list Python 2 and 3 generically)
  • Current state of ctypes bindings compatibility with recent glibc/PAM versions
  • Whether the 1610-day gap since last release indicates maintenance concerns or stable maturity

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 1,610 days since the last release
Last repo commit
First released
Downloads2,335,539 / month, #3,128 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 6 - MatureEnvironment :: PluginsIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: SecurityTopic :: System :: Systems Administration :: Authentication/Directory

Evidence: python_pam-2.0.2-py3-none-any.whl

Tags

Capabilities
linux pam authenticationsystem user authentication pythonpam credentials verifylinux password validationpluggable authentication modules pythonunix user authenticationpam service authentication
Topics
linux-pamsystem-authctypes-binding

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “linux pam authentication”

  • python-pamPython wrapper for Linux PAM (Pluggable Authentication Modules) that…
  • pamelaPamela provides a Python interface to the Linux/Unix PAM (Pluggable…
  • keepercommanderKeeper Commander is a command-line and terminal UI tool for managing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Security packages

SecretStorage With conditions
PyPI · Python Modules · released Nov 2025

Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.

BSD-3-Clausepure Python · 3.10+aging
226.9Mdownloads / mo
msal Worth it
PyPI · Security · released May 2026

MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.

MITpure Python · 3.9+
223.0Mdownloads / mo
joserfc Worth it
PyPI · Security · released Jul 2026

joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.

BSD-3-Clausepure Python · 3.10+
155.5Mdownloads / mo
Authlib Worth it
PyPI · Security · released May 2026

Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.

BSD-3-Clausepure Python · 3.10+
155.1Mdownloads / mo
argon2-cffi-bindings With conditions
PyPI · Python Modules · released Jul 2025

Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.

MITcompiled wheel · 3.9+
74.2Mdownloads / mo
adal Skip
PyPI · Security · released Apr 2021

ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.

Install only if maintaining existing code that already depends on it, and plan a migration.

MITpure Pythonabandoned
44.5Mdownloads / mo

See also pamela · httpx-ntlm · docker-pycreds · pyseccomp · pure-python-adb · google-cloud-privilegedaccessmanager · siwe · wsgidav · pyspnego · requests-ntlm2