Operating System - HP-UX
1834804 Members
2896 Online
110070 Solutions
New Discussion

how to know which ip the user logins from?

 
SOLVED
Go to solution
Crystal_1
Frequent Advisor

how to know which ip the user logins from?

Hi,

I would like to know from which ip the user comes from. The output from w, who, or finger cannot give me the answer.

U no this?

Tx, Crystal
11 REPLIES 11
Sridhar Bhaskarla
Honored Contributor
Solution

Re: how to know which ip the user logins from?

who -R
You may be disappointed if you fail, but you are doomed if you don't try
Tracey
Trusted Contributor

Re: how to know which ip the user logins from?

You can use:

who -R

Or to find out past logons, use:

last -R
steven Burgess_2
Honored Contributor

Re: how to know which ip the user logins from?

Hi

last | more

succesful logins

lastb | more

unsuccesful logins

Hope this helps

Steve
take your time and think things through
Crystal_1
Frequent Advisor

Re: how to know which ip the user logins from?

Yes, I got it...

Tx,
steven Burgess_2
Honored Contributor

Re: how to know which ip the user logins from?

Crystal

last -R

will expand for ip's

Steve
take your time and think things through
James R. Ferguson
Acclaimed Contributor

Re: how to know which ip the user logins from?

Hi Crystal:

You can do:

# last -r username

This assumes that you have touched 'var/adm/wtmp' to first create it.

# who -R

...will also yield the hostname or IPaddress of the user(s).

In either case, if a hostname (or FQDN) is returned, and you want its corresponding IPAddress, do:

# getip hostname

Regards!

...JRF...
Sandip Ghosh
Honored Contributor

Re: how to know which ip the user logins from?

Hi Crystal,

Start inetd in logging mode. It will report all the IP address in your syslog.log file.
#inetd -l

You can start it any time. But be aware that the size of syslog file can grow faster than earlier.

Sandip
Good Luck!!!
Tim D Fulford
Honored Contributor

Re: how to know which ip the user logins from?

last -R

or who -u

Tim
-
Deshpande Prashant
Honored Contributor

Re: how to know which ip the user logins from?

Hi
You can also try
#who -T

Thanks.
Prashant.
Take it as it comes.
James R. Ferguson
Acclaimed Contributor

Re: how to know which ip the user logins from?

Hi (again) Crystal:

Sorry, i meant 'last -R' not 'last -r'.

...JRF...
Arockia Jegan
Trusted Contributor

Re: how to know which ip the user logins from?

Use,

who -uH
last -R