Date: Mon, 8 Jan 2001 20:40:19 -0500 From: "Robert Myers" <ccrider@whiterose.net> To: "'Steven'" <steven@trance.org>, "'FreeBSD Questions'" <freebsd-questions@FreeBSD.ORG> Subject: RE: print login details Message-ID: <002101c079dd$208a1ef0$0201a8c0@ccrider2k> In-Reply-To: <NEBBLBKNKLDHDLHHPODBKECBCLAA.steven@trance.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> I've just hooked up an old parallel dot matrix printer i've > had lying around > to my fbsd firewall/NAT machine. I followed the instructions > in the handbook > and can now send lines of text to be printed by using > "command > /dev/lpt0". > The purpose of this exercise is to send simple logging to the > printer, so if > the machine gets rooted i'll have a hard copy of things. > > The machine is accessable by a terminal (on com port 1) and > ssh only (it has > no monitor/keyboard attached directly). I am the only person > who should ever > log into it. To start off with, I'd just like the machine to > print each time > someone logs in (and if when someone su's to another user if > possible) the > details (eg time, originating ip etc) and again when they log off. > OK, try this, in /etc/syslog.conf you will want a line similar to this: auth.info /var/log/file <--this can be a device too I just tried this on my machine at home, and got the following: Jan 8 20:41:27 gateway login: 1 LOGIN FAILURE FROM 192.168.1.2 Jan 8 20:42:38 gateway login: 1 LOGIN FAILURE FROM 192.168.1.2 Jan 8 20:42:58 gateway login: 2 LOGIN FAILURES FROM 192.168.1.2 Jan 8 20:43:06 gateway login: login from 192.168.1.2 on ttyp1 as root Jan 8 20:43:06 gateway login: ROOT LOGIN (root) ON ttyp1 FROM 192.168.1.2 Hope that helps. :) Robert Myers Systems Administrator White Rose Internet Service http://whiterose.net (717)439-1478 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002101c079dd$208a1ef0$0201a8c0>