How to configure vsftpd to send me an email on user login process? [closed]

StackOverflow https://stackoverflow.com/questions/21382432

  •  03-10-2022
  •  | 
  •  

Вопрос

I want to send a mail to abc@abcd.com when someone is logging in via FTP. I have tried using /etc/pam.d/vsftpd "session optional pam_exec.so /path/to/my/emailing_script.sh" but it doesn't work (i have tested this script in /etc/pam.d/sshd and it works).

Any suggestions?

Thanks in advance.

Это было полезно?

Решение

In order for vsftp to use the pam sessions you need to enable it in the configuration file:

add (or update) the line

session_support=YES

without that line PAM sessions will not be used so your PAM session module will not be run either.

Look for "session_support" on this documentation page.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top