- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mapping of IP to login name
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:33 PM
05-21-2002 07:33 PM
Mapping of IP to login name
From the netstat output, it displays the foreign IP addresses that connects to the host.
With this info, is there a way to find out who (ie. the login name) is login.
Thanks in advance,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:36 PM
05-21-2002 07:36 PM
Re: Mapping of IP to login name
who -T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:41 PM
05-21-2002 07:41 PM
Re: Mapping of IP to login name
hi
is the user telnet user.
then
who -u or who -T
CTK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:44 PM
05-21-2002 07:44 PM
Re: Mapping of IP to login name
The connect is through socket number (Client / Server application, not telnet).
who -T and who -u do not display the login name.
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:46 PM
05-21-2002 07:46 PM
Re: Mapping of IP to login name
# who -u
# who -T
The only downside of this that I see is that the output displays where there telnet session came from, not necessarily their own PC IP address or name.
e.g. My own IP address of my PC is say 10.20.20.25, but I was logged into another box first, before telnetting across to this one, so in fact it will show the IP or name of the server. 10.25.25.30
HTH
~Michael~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 07:57 PM
05-21-2002 07:57 PM
Re: Mapping of IP to login name
Also you can edit following file add the option
export INETD_ARGS="-l" these will add all your connection information to syslog.
/etc/rc.config.d/netdaemons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 08:18 PM
05-21-2002 08:18 PM
Re: Mapping of IP to login name
May be you will like to look at lsof , this lists the active connections , port etc etc
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/README
download the binary and you are good to go . It will list the port with the user name connection etc .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 08:37 PM
05-21-2002 08:37 PM
Re: Mapping of IP to login name
If the ftp sire doesn't work try from here:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2002 09:41 PM
05-21-2002 09:41 PM
Re: Mapping of IP to login name
If you are using SSH Communication's distribution of SSH, then you can find out the IP and user by reading from whoami and the SSH2_CLIENT value:
bash-2.05a$ echo `whoami` $SSH2_CLIENT
steven 1.2.3.4 4931 5.6.7.8 22
login=steven
source IP=1.2.3.4
source port=4931
dest IP=5.6.7.8
dest port=22
If you embed this command into /etc/profile and /etc/csh.login, then you can keep track of all SSH logins e.g.
echo `whoami` $SSH_CLIENT >> /var/adm/syslog/ssh.log
Hope this helps. Regards.
Steven Sim Kok Leong