<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>You could always that directive to common-session and try. <br>
<br>
</div>
<div><br>
On Dec 24, 2014, at 11:01 PM, "Chip" <<a href="mailto:jeffschips@gmail.com">jeffschips@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
I've researched this feature extensively and need help. PAM is a difficult authentication program for me to thoroughly understand although I'm learning.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
Running Debian Wheezy.<br>
</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
Have pam setup to trigger off an email when users login using sshd -- that works fine.  No problem using this command in the /etc/pam.d/sshd file:<br>
</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
session    optional     pam_exec.so /usr/local/bin/notify.sh<br>
</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
However, I need it to work with vsftpd and getting it to work with sshd was just a test.  However, I can't get it to work with vsftpd, the contents of /etc/pam.d/vsftpd are:<br>
</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
<br>
auth    required        pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed<br>
@include common-account<br>
@include common-session<br>
@include common-auth<br>
session    optional     pam_exec.so /usr/local/bin/notify-login.sh</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
What am I missing here?  Is pam even designed to work with vsftpd?  Running the following command indicates it's hooked into vsftpd, but pam_exec.so doesn't seem to want to play nicely with vsftpd.<br>
</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      14px; vertical-align: baseline; background-color: rgb(255, 255,
      255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
      'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 17.804800033569336px; orphans: auto; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-position: initial initial; background-repeat: initial
      initial;">
$ ldd /{,usr/}{bin,sbin}/* | grep -B 5 libpam | grep '^/'<br>
/bin/login:<br>
/bin/su:<br>
/sbin/mkhomedir_helper:<br>
/sbin/pam_tally2:<br>
/usr/bin/chfn:<br>
/usr/bin/chsh:<br>
/usr/bin/c_rehash:<br>
/usr/bin/crontab:<br>
/usr/bin/passwd:<br>
/usr/sbin/aspell-autobuildhash:<br>
/usr/sbin/atd:<br>
/usr/sbin/chpasswd:<br>
/usr/sbin/cron:<br>
/usr/sbin/newusers:<br>
/usr/sbin/sshd:<br>
/usr/sbin/vsftpd:<br>
<br>
</p>
<br>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Pam-list mailing list</span><br>
<span><a href="mailto:Pam-list@redhat.com">Pam-list@redhat.com</a></span><br>
<span><a href="https://www.redhat.com/mailman/listinfo/pam-list">https://www.redhat.com/mailman/listinfo/pam-list</a></span></div>
</blockquote>
</body>
</html>