home *** CD-ROM | disk | FTP | other *** search
- 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
- From: fredj@wang.com (Fast Freddie)
- Newsgroups: comp.unix.admin
- Subject: Re: Identifying user's remote IP address at login?
- Message-ID: <BxM36A.5HA@wang.com>
- Date: 12 Nov 92 16:30:10 GMT
- References: <1992Oct29.004719.9096@news.ysu.edu>
- Sender: news@wang.com
- Organization: Wang Labs, Lowell MA, USA
- Lines: 15
- Nntp-Posting-Host: wonk.wang.com
-
- ae954@yfn.ysu.edu (Andy Johnston) writes:
-
-
- >I am trying to set up a system in which a utility called
- >from the .login file can identify the IP address (or system name)
- >of a remote user at login and perform a
- > setenv DISPLAY <user's system>:0
- >to make X displays pop up in the right place.
-
- >The utmp file only has 16 characters reserved for the remote
- >name and is often truncated, so it isn't always reliable.
- What you can do is scan/grep the utmp file for the 16 characters. Cut that
- out and grep the etc/hosts file, cutting out the first field which usually
- is the internet address.
- Fast Freddie
-