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