About Anaconda Help Download Anaconda

wakari / packages / python-pam 1.8.2

Python PAM module using ctypes, py3/py2

Installers

Info: This package contains files in non-standard labels.
  • win-32 v1.8.2
  • osx-64 v1.8.2
  • win-64 v1.8.2
  • linux-64 v1.8.2
  • linux-32 v1.8.2

conda install

To install this package run one of the following:
conda install wakari::python-pam
conda install wakari/label/release:4.2.0::python-pam
conda install wakari/label/release:4.2.1::python-pam
conda install wakari/label/release:4.2.2::python-pam
conda install wakari/label/release:4.3.0::python-pam
conda install wakari/label/release:4.3.1::python-pam
conda install wakari/label/release:4.3.2::python-pam
conda install wakari/label/release:4.3.2a::python-pam
conda install wakari/label/release:4.3.3::python-pam

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
>>>

© 2024 Anaconda, Inc. All Rights Reserved. (v4.0.6) Legal | Privacy Policy