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

An interface to the Pluggable Authentication Modules (PAM) library on linux, written in pure python (using ctypes)


This module provides an authenticate function that allows the caller to authenticate a given username / password against the PAM system on Linux.


Run python3 install as root to install the module, then import the authenticate function, and use it as follows:

from simplepam import authenticate
authenticate(username, password, service)

The full function signature is as follows:

authenticate(username, password, service='login', encoding='utf-8',

The service argument specifies the PAM service to authenticate against. Defaults to login.

username, password and service can be given as strings or bytes. If they are strings, they will be encoded using the encoding given by the encoding parameter, or, if omitted, as UTF-8.

The function returns True if the authentication succeeds and returns False if authentication fails (or if PAM returns an error (FIXME)).

Python versions

This module works with both Python 2 and Python 3.


The original python-pam module was written by Chris AtLee, see the original copyright notice:

Copyright (C) 2007-2009 Chris AtLee <>.
Licensed under the MIT license.

Modifications 2013-2014 by Leon Weber

  • Ported to Python3
  • Add call to pam_end()
  • Use ctypes.byref() instead of ctypes.pointer() to pass arguments by reference
  • Properly handle encoding of password, username and service (Patch by Sebastian Riese)
  • Add call to pam_reset() (Patch by Lertsenem)
  • Re-add Python2 support (Patch by Victor Stinner of eNovance)

This module is licensed under the MIT license.

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
simplepam-0.1.5.tar.gz (2.4 kB) Copy SHA256 Checksum SHA256 Source Mar 25, 2014

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