[6.3] Get e-mail when CTRL-ALT-DEL is used?

George Davidovich freebsd at optimis.net
Thu Jul 8 10:57:51 UTC 2010

On Thu, Jul 08, 2010 at 12:12:27PM +0200, Gilles wrote:
> This is on a remote 6.3 host: I'd like to get an e-mail if a user hits
> the CTRL-ALT-DEL to reboot the server.
> Googling told me that the use of the three-key combo can be
> enabled/disabled when compiling a new kernel, but not how to manage
> this feature when it's enabled in a running kernel.
> Is there a configuration file somewhere that would let me add e-mail
> support for this action?

Assuming you want to know whether the server was rebooted (as opposed to
whether a user invoked a given key combination), adding something
along the lines of the following to root's crontab(5) should suffice:

  @reboot echo "`hostname` rebooted" \
  | mail -s "`hostname` rebooted" gilles at example.org


More information about the freebsd-questions mailing list