You are viewing a single comment's thread from:

RE: Security 101: Account Security - PAM!

in #security7 years ago

In python you could use something like this:

import pam

if pam.authenticate('username','password'):
    print 'authentication correct'
else:
    print 'authentication incorrect'



You'll need the python-pam module. I have no Python experience, got the code from Stack Overflow, so it may/may not work.

You can also see this code sample in Stack Overflow for using PAM in C++ to get an idea and implement it in your own code.

I plan to make some examples in the series though.

Sort:  

Thank you. I'm looking forward to it.