home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / admin / 6157 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.1 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!bu.edu!wang!fredj
  2. From: fredj@wang.com (Fast Freddie)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: Identifying user's remote IP address at login?
  5. Message-ID: <BxM36A.5HA@wang.com>
  6. Date: 12 Nov 92 16:30:10 GMT
  7. References: <1992Oct29.004719.9096@news.ysu.edu>
  8. Sender: news@wang.com
  9. Organization: Wang Labs, Lowell MA, USA
  10. Lines: 15
  11. Nntp-Posting-Host: wonk.wang.com
  12.  
  13. ae954@yfn.ysu.edu (Andy Johnston) writes:
  14.  
  15.  
  16. >I am trying to set up a system in which a utility called
  17. >from the .login file can identify the IP address (or system name)
  18. >of a remote user at login and perform a
  19. >    setenv DISPLAY <user's system>:0
  20. >to make X displays pop up in the right place.
  21.  
  22. >The utmp file only has 16 characters reserved for the remote
  23. >name and is often truncated, so it isn't always reliable.
  24. What you can do is scan/grep the utmp file for the 16 characters.  Cut that
  25. out and grep the etc/hosts file, cutting out the first field which usually
  26. is the internet address.
  27. Fast Freddie
  28.