Date: Thu, 27 Feb 2014 07:19:16 -0500 (EST) From: Daniel Feenberg <feenberg@nber.org> To: Arthur Chance <freebsd@qeng-ho.org> Cc: Jim Pazarena <fquest@paz.bz>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: notifications of log in Message-ID: <alpine.LRH.2.11.1402270706030.30905@nber7.nber.org> In-Reply-To: <530EF92E.2050004@qeng-ho.org> References: <530EBAEA.9050300@paz.bz> <530EF92E.2050004@qeng-ho.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Feb 2014, Arthur Chance wrote: > On 27/02/2014 04:11, Jim Pazarena wrote: >> Is there a way to have syslog email a notice upon ANY log in to a >> server, by any user ID? >> >> I'm not worried about failed attempts, but I'd like a prompt notice if >> someone does successfully log in. > 3 possibilities In order of increasing difficulty: You could put a "logger" command in /etc/csh.login and/or /etc/profile. The "login" command also seems to call at least one other command for each successful login "mail -t". I suppose you could replace "mail" with a command that detected the "-t" and both checked for mail and invoked the "logger" command to send a login info message to syslogd. PAM could also be configured to log logins. Daniel Feenberg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LRH.2.11.1402270706030.30905>