Skip to content

Receive a push notification on your phone every time someone logs into your server

License

Notifications You must be signed in to change notification settings

zahlex/ubuntu-login-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Ubuntu login notify

Receive a push notification on your phone every time someone logs into your server.

Currently prepared for the iOS-only app Prowl. However, adapting to an Android solution like NotifyMyAndroid should be quite easy.

Instructions:

  • Install cURL and check time zone:
    apt install curl && dpkg-reconfigure tzdata

  • Copy login-notify.sh to a suitable place, I chose /root/ and make it executable:
    chmod +x login-notify.sh

  • Grab your API key and paste it into login-notify.sh

  • Add the following line to /etc/pam.d/common-session and /etc/pam.d/sudo
    session optional pam_exec.so /root/login-notify.sh

  • Make sure you double check the path to this script in the line you just pasted.

  • Receive lots of notifications.

Thanks to StalkR for the great inspiration:
https://blog.stalkr.net/2010/11/login-notifications-pamexec-scripting.html

License: MIT

About

Receive a push notification on your phone every time someone logs into your server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages