- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- detect ip address
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
01-09-2005 04:32 AM
01-09-2005 04:32 AM
detect ip address
i want to know
how can i detect who is login server and what commands he/she written
i do the following in /etc/profile
export HISTFILE=/tmp/sh.history.$LOGNAME
but this procedure can't detect IP address for that user.
help
kamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 05:46 AM
01-09-2005 05:46 AM
Re: detect ip address
to get the IP address/hostname of the system user
is logging in from and add that to the HISTFILE name.
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 05:51 AM
01-09-2005 05:51 AM
Re: detect ip address
last -R | grep
Will show the ip address they are logged on from
lastb -R
Will show you failed logins
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 05:53 AM
01-09-2005 05:53 AM
Re: detect ip address
who -R
for current users
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 06:38 AM
01-09-2005 06:38 AM
Re: detect ip address
can u display more
step by step (i didn't use awk before)
thankx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 06:57 AM
01-09-2005 06:57 AM
Re: detect ip address
This will print the 6th field from the command who -R am i.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 07:04 AM
01-09-2005 07:04 AM
Re: detect ip address
whoami=`who -R am i | awk '{print $6}'`
client=${whoami##*\(}
client=${client%\)}
export HISTFILE="/tmp/sh_history.$LOGNAME.$client"
This should set HISTFILE to /tmp/sh_history.NAME.host.company.com
Hope this helps.
- Biswajit