[oclug] TCP Wrapper problem
tburns at ualberta.ca
Thu Aug 9 10:05:40 EDT 2001
Getting back to what was asked in the first place (writing a message to
the screen and e-mailing a notification)...
/etc/motd prints out a message after you login, I think, so it's no good.
AFAIK, getty (or mgetty, or something else) is responsible for getting
you in (though this may only be for consoles and serial ports; I don't
know). This, however, I gleaned from `man getty' on a RH7.0 box:
Next, getty types the issue (or login banner, usually from
/etc/issue) and login prompt. Finally, getty reads the
user's login name and invokes login(1m) with the user's
name as an argument. While reading the name, getty
attempts to adapt the system to the speed of the terminal
being used, and also sets certain terminal parameters (see
termio(7)) to conform with the user's login procedure.
Indeed, /etc/issue on this box contains:
Red Hat Linux release 7.0 (Guinness)
Kernel 2.2.16-22 on an i586
Though that's NOT what's printed when I telnet in. Neither is the
contents of /etc/issue.net
You might check in.telnetd (/usr/sbin/in.telnetd on this box), as it's
called from inetd. Running a `ps aux' I notice that telnetd is running a
few times, probably once per connection to the box.
You might be able to patch in.telnetd or telnetd, or get inetd to call a
script of yours which e-mails you and then runs (in.)telnetd anyway.
Hope this helped!
Me spell chucker work grate. Need gramma chicken.
More information about the OCLUG