On Fri, Sep 01, 2017 at 08:38:24PM +0200, William Gathoye wrote:
On 09/01/2017 08:26 PM, brent s. wrote:
You don't execute pam_lastlog.so directly.
As shown, pam is calling the pam_lastlog.so object (which is why you can't execute it; it's not an executable, it's a Shared Object).
Ok. Actually, I saw this was a shared object, and I wondered this is the first time was seeing a SO which was executable. This confirms y assumption :)
Most .so files are executable, albeit for historic reasons... And you don't need to directly execute it. The manpage even has EXAMPLES section that explains how to hook pam_lastlog into your PAM setup. You most likely need to call is with some arguments. For instance, on a fedora 26 system: ---------- : grep pam_lastlog /etc/pam.d/postlogin-ac session [default=1] pam_lastlog.so nowtmp silent session optional pam_lastlog.so silent noupdate showfailed ---------- Cheers, -- Leonid Isaev