No description
Find a file
2026-01-12 10:34:58 -05:00
.gitignore Initial impl in Python 2026-01-12 10:24:11 -05:00
.python-version Initial impl in Python 2026-01-12 10:24:11 -05:00
main.py Initial impl in Python 2026-01-12 10:24:11 -05:00
pyproject.toml Initial impl in Python 2026-01-12 10:24:11 -05:00
README.md Add README 2026-01-12 10:34:58 -05:00
riddler.py Initial impl in Python 2026-01-12 10:24:11 -05:00
uv.lock Initial impl in Python 2026-01-12 10:24:11 -05:00

PAM Sphinx (Python)

This module utilizes pam_python

I don't know if there's a way to install and use external libraries in the pam_python.so provided environment, so it uses urllib.requests to manually make API calls to LLM.

This was just a proof-of-concept: demo

Usage

  1. Install pam_python
  2. Correct the LLM_ENDPOINT, LLM_API_KEY, and model to appropriate values.
  3. Copy the main.py to /lib/security/sphinx.py.
  4. Write the system prompt in /etc/sphinx.prompt. Make it output either ACCESS_GRANTED or ACCESS_DENIED at the end.
  5. Add auth [success=2 default=ignore] pam_python.so sphinx.py to the top of /etc/pam.d/common-auth

See pam_sphinx for updated version re-written in C++