Ano-Tech Computers
Enter keyword:

How to make Courier-IMAP log to lastlog using pam_lastlog
Problem:
I have a ton of accounts on my server, but I have no idea which ones are actually in active use. Courier-IMAP created two files in /etc/pam.d aptly named 'imap' and 'pop3'. Reading the man page for pam_lastlog and trying to understand how PAM works, I have tried adding 'session required pam_lastlog.so silent' to both files. (The 'silent' keyword is used to suppress the information message typically shown when using ssh or telnet to log in) auth required pam_nologin.so auth required pam_stack.so service=system-auth account required pam_stack.so service=system-auth session required pam_stack.so service=system-auth session required pam_lastlog.so silent Unfortunately, the monster that is PAM refuses to cooperate.... what am I doing wrong?
 
Solution:
Unfortunately, the current version of Courier-Auth does not seem to call pam_session_start() and pam_session_stop().

 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles