You are viewing a single comment's thread from:

RE: Security 101: Account Security - PAM!

in #security7 years ago

Very nice post, thanks for taking the time! I would be grateful if you could give an example of how to use these modules in a concrete way, like e.g. in a python script or a c++ program.

Sort:  

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.

Thank you. I'm looking forward to it.

Coin Marketplace

STEEM 0.25
TRX 0.25
JST 0.040
BTC 94833.25
ETH 3451.78
USDT 1.00
SBD 3.35