Reputation: 21
I wrote the program that would need to authenticate users using their Linux usernames and passwords. I think it should do with PAM. I have tried searching from google PAM module for python3, but I did not find any. Is there a ready to use the PAM libraries, or try to make my own library? Is PAM usage some special security risks that should be taken into?
I know that I can authenticate users with python3 spwd class but I dont want to use that, because then I have to run my program with root access.
Upvotes: 2
Views: 3038
Reputation: 793
A bit late, but I thought I might post this for users to find via Google:
There’s a python3 version of said module which I maintain at https://github.com/leonnnn/python3-simplepam. The naming is different from the python2 version to avoid confusion with an Ubuntu package called python3-pam, but apart from the name, it’s the same as Chris AtLee’s module.
The python3-simplepam module is also available for installation via yum in Fedora 19 and later.
Upvotes: 4
Reputation: 419
+che
the python pam module you linked to is not python3 compatible. there are three pam modules that i'm aware of {'pam', 'pypam', 'spypam'}, and none are py3 compatible.
i've modified Chris AtLee's original pam package to work with python3. cleaning it up a bit before feeding back to him
Upvotes: 1