Operating System - HP-UX
1753964 Members
7438 Online
108811 Solutions
New Discussion юеВ

Re: how to see ip of connected users

 
SOLVED
Go to solution
attilio_1
Frequent Advisor

how to see ip of connected users

Hello at all
I have seen with w command users connected at the server but I would like see other information. In which log or in which other way is possible see ip address of users connected to the server?
The syslog show the ip address for ftp login but for telnet connection only the terminal

Is possible to see which samba users are connected by windows to the shared folder in the server ?
Thanks in advance
Attilio
and which command they use ?
12 REPLIES 12
Fred Ruffet
Honored Contributor

Re: how to see ip of connected users

"who -u" is a good way. Last field is the DISPLAY for the connection.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Ivajlo Yanakiev
Respected Contributor

Re: how to see ip of connected users

who -ua
Ivajlo Yanakiev
Respected Contributor

Re: how to see ip of connected users

netstat -an |more
or
lsof |more





Emanuele De Angelis
Frequent Advisor

Re: how to see ip of connected users

Hi,
try with "finger -R".
Bye
Ranjith_5
Honored Contributor

Re: how to see ip of connected users

Hi,


use
#who -T

regards,
Syam
Muthukumar_5
Honored Contributor

Re: how to see ip of connected users

login informations are maintained in /var/adm/wtmp file so that,

last command gives login informtion as,

last | grep 'still'

it will report currently logged users.

Simply use,

who -T

HTH.
Easy to suggest when don't know about the problem!
Fabio Ettore
Honored Contributor

Re: how to see ip of connected users

Hi Attilio,

I think the command that you are looking for is smbstatus. Normal users (e.g. connected by telnet session) you can view by

who -R
or
who -Hu

but in order to view samba connected users you have to use smbstatus.

Best regards,
Fabio
WISH? IMPROVEMENT!
Charles Holland
Trusted Contributor
Solution

Re: how to see ip of connected users

Attilio,

Building on the who command I submit the following script for your review

for i in `who -u|awk '{ print $8 }'`
do
ping -I 2 $i -n 2
done

This will priovide output like:
PING PC-NAME.DOMAIN.local: 64 byte packets
64 bytes from AAA.BBB.CCC.DDD: icmp_seq=0. time=0. ms
64 bytes from AAA.BBB.CCC.DDD: icmp_seq=1. time=0. ms

----PC-NAMW.DOMAIN.local PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

Please NOTE: If a user is logged into the system more than once, such as once as root and again as user ABC you will get two pings back because it is two physical connections.

For your Samba users I would suggest using smbstatus as suggested and use the -S option to provide a simple one line type report... just a suggestion.

Points for answers.

Regards.
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
attilio_1
Frequent Advisor

Re: how to see ip of connected users

Thanks at all !
Charles and Fabio,
about samba I see the logged users, but there is a way to control users command ?

Best regards
Attilio