home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / admin / 6207 < prev    next >
Encoding:
Internet Message Format  |  1992-11-16  |  1.6 KB

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