home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!princeton!tex.Princeton.EDU!subbarao
- From: subbarao@fc.hp.com (Kartik Subbarao)
- Newsgroups: comp.unix.admin
- Subject: Re: Identifying user's remote IP address at login?
- Message-ID: <1992Nov16.150705.4912@Princeton.EDU>
- Date: 16 Nov 92 15:07:05 GMT
- References: <CKD.92Nov12161221@loiosh.eff.org> <1992Nov15.031633.16012@bradley.bradley.edu> <1978@lysator.liu.se>
- Sender: news@Princeton.EDU (USENET News System)
- Reply-To: subbarao@fc.hp.com
- Organization: putchar('I'); for (i = 0; i < 3; i++) putchar('E');
- Lines: 21
- Nntp-Posting-Host: tex.princeton.edu
-
- In article <1978@lysator.liu.se> pen@lysator.liu.se (Peter Eriksson) writes:
- >brad@bradley.bradley.edu (Bradley E. Smith) writes:
- >
- >>why not write a program similar to this one.....and use getpeername
- >
- >Won't work. Most systems use a telnet daemon that "insulates" the user
- >processes from the network stream so the user process can't do the
- >getpeername() call. What one *could* do if one is really brave is to
- >write a program that opens /dev/kmem and locates the telnetd process that
- >handles _your_ session, and then walk thru the files it has open looking for
- >the network connection socket... Or one could rewrite telnetd to either write
- >the IP number into the log files (that is what I did. And then I rewrote
- >"who", et al to use nameserver lookups for the IP numbers.) or have it write
- >the full domain name into a separate log file...
- >
- >Either way requires root access.
-
- There's a program that does just this called ofiles. Be warned, though, it
- can be slooooooowwwwww at times...
-
- -Kartik
-