Skip to main content
License PyPI Version Python Versions PyPI Wheel Build Status Coverage PyPI Downloads

A Django PAM authentication backend implementation.

The MIT License (MIT)

Overview

This is a simple authentication backend that uses the python-pam package. Django PAM can be used in an SSO (Single Sign On) environment or just with a single box where you want to log into a Django app with your UNIX login.

Updated for Django 6.0.x and Python 3.13.

Python 2.x has been depricated. If you need a version of Django PAM use version 2.0.1.

Provides

  1. PAM Authentication Backend

  2. Login and Logout Views

  3. Templates for both standard and modal authentication.

  4. Supporting JavaScript and CSS.

Quick Start

You will need to add Django PAM to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'django_pam',
]

Next you will need to add the Django PAM backend to the AUTHENTICATION_BACKENDS:

AUTHENTICATION_BACKENDS = [
    'django_pam.auth.backends.PAMBackend',
    'django.contrib.auth.backends.ModelBackend',
]

The user that runs the application needs to be a member of the /etc/shadow file group, this is usually the web server user. This is necessary so the web server can authenticate other users. To do this run the command below with the proper user:

$ sudo usermod -a -G shadow <user>

Complete Documentation can be found on Read the Docs at: Django PAM

Metadata

Release files for django-pam 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pam 3.0.1
File Size Uploaded
django_pam-3.0.1.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-pam 3.0.1
File Interpreter ABI Platform
django_pam-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.6 kB

Release files / django_pam-3.0.1.tar.gz

Download URL django_pam-3.0.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
da1094b049debfac0dfd052c420ca82306ff6a95f7f9e72106bdb5b4e5dd70c2
BLAKE2b-256 checksum
How to use checksums
2969525b06667dabbb3b65b5eff8e6a45450113cf041d6600d9728212bd1357f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

Release files / django_pam-3.0.1-py3-none-any.whl

Download URL django_pam-3.0.1-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
499ef457eac351c2f132c130a2aba1bb3adadb177a9510fa36271fcec72aff43
BLAKE2b-256 checksum
How to use checksums
079b05ad68cdb38c32c045303493dd70538b7bbc523af9ea93e927deb6b53946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page