2

I'm looking for an easy way to configure my server, so that whenever a user logs into it, I get an email about it.

Any pointers around how to get this working?

2 Answers 2

3

Somebody has already built a notification module for PAM. I would look into downloading that and entering an appropriate configuration line in your related /etc/pam.d/ files.

If your users are restricted in what shells they select and they all process /etc/profile (bash does), you can write a script into that.

-1

If your default shell is bash, you can add a sendmail entry to every .bashrc file to notify yourself of user logins.

I am sorry if it does not work that way. I am noob and trying to help you here.

1
  • 2
    Things that may make that an issue: chsh and the ability of a user to edit their own .bashrc. Mar 31, 2012 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .