Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
(PAM) Howto setup login-notifications
« previous
next »
Print
Pages: [
1
]
Author
Topic: (PAM) Howto setup login-notifications (Read 772 times)
prod_fk
Newbie
Posts: 1
Karma: 0
(PAM) Howto setup login-notifications
«
on:
January 28, 2023, 06:54:30 pm »
Hey folks,
I've setup a bash script on all of my machines, which sends a notification via curl to a REST-API every time a login happens.
Adding:
Code:
[Select]
# login notifications
session optional pam_exec.so seteuid /usr/local/bin/common-notify.sh
On Linux in
/etc/pam.d/common-session
makes the script to execute whenever a user logs in or starts a new session on the system. However I couldn't find any corresponding file on OPNsense :/
I've already tried
/etc/pam.d/system
/etc/pam.d/sshd
/etc/pam.d/login
/usr/local/opnsense/service/templates/OPNsense/Auth/system.pam
and also changed
optional
to
required
, but logins (over ssh & UI) just keep working without any notification.
On FreeBSD PAM seems different and especially with the special OPNsense configurations (e.g. for 2FA "inside" your password) I just can't find out howto achive this.
Any ideas are highly appreciated!!
«
Last Edit: January 28, 2023, 06:58:16 pm by prod_fk
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
(PAM) Howto setup login-notifications