Skip to main content
Help us improve Python packaging – donate today!

Python PAM module using ctypes, py3/py2

Project Description

python-pam
==========

Python pam module supporting py3 (and py2)

Commandline example:

```
[david@Scott python-pam]$ python pam.py
Username: david
Password:
0 Success

[david@Scott python-pam]$ python2 pam.py
Username: david
Password:
0 Success
```

Inline examples:
```
[david@Scott python-pam]$ python
Python 3.4.1 (default, May 19 2014, 17:23:49)
[GCC 4.9.0 20140507 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pam
>>> p = pam.pam()
>>> p.authenticate('david', 'correctpassword')
True
>>> p.authenticate('david', 'badpassword')
False
>>> p.authenticate('david', 'correctpassword', service='login')
True
>>> p.authenticate('david', 'correctpassword', service='unknownservice')
False
>>> p.authenticate('david', 'correctpassword', service='login', resetcreds=True)
True
>>> p.authenticate('david', 'correctpassword', encoding='latin-1')
True
>>> print('{} {}'.format(p.code, p.reason))
0 Success
>>> p.authenticate('david', 'badpassword')
False
>>> print('{} {}'.format(p.code, p.reason))
7 Authentication failure
>>>
```


Release history Release notifications

This version
History Node

1.8.3

History Node

1.8.2

History Node

1.8.1

History Node

1.8

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
python_pam-1.8.3-py2.py3-none-any.whl (5.8 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Mar 24, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page