Find User based on IP address or hostname

Hello All,

Does anyone know of a way to find out what user is logged onto a computer if you know the hostname or the ip address?

Here is the situation, it has been determined that a pc is broadcasting traffic which is saturating the network bandwidth. What I have is the ip address of the computer but in an environment of over 150 computers I need to know who the user is in order to find where the computer is located.

If anyone can provide suggestions this would be extremely helpful. Thanks.

Keith
kwoznicaAsked:
Who is Participating?
 
Jay_Jay70Commented:
Hi kwoznica,

nbtstat - a ip address

will tell you all!

Cheers!
0
 
Jay_Jay70Commented:
0
 
Dushan De SilvaTechnology ArchitectCommented:
Actually following will work ;)

nbtstat -a ip address

Or else you can download "Advance Ip scanner" kind of software. Which allows to give specific IP range and list all the details about those machines.

BR Dushan
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
MitchV85Commented:
Here is a script I have that will tell you exactly who is logged into a remote machine that you can specify by hostname. When the script launches it will bring up a logon prompt and all you have to do is enter the NetBIOS name of that machine and it will tell you exactly who is logged in at that time.

Here it is!


'***********************************************************************************************
'*                                                                               *
'*      This script will allow you to query a computer and see who is currently logged on,                                                        *
'*      provided you have the sufficent permissions.                                                                           *
'*                                                                               *
'***********************************************************************************************

On Error Resume Next

strComputerName = InputBox("Enter the name of the computer you wish to query", "Logon Session Spy")
            If strComputerName = "" Then
                  Wscript.Echo "You must enter a valid data string into the computer name field."
                  Wscript.Quit
            End If

who = "winmgmts:{impersonationLevel=impersonate}!//"& strComputerName &""
      If Err.Number <> 0 Then
            Wscript.Echo strComputerName & " " & Err.Description
            Wscript.Quit
      End If

Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem")

            For each User in Users      
                  Wscript.Echo "The user name for the specified computer is: " & User.UserName
            Next




That should do it for you!

Hope this helps!
Mitch
0
 
MitchV85Commented:
sorry about that forgot to edit out the comment line at the top. Here is just the script...........




On Error Resume Next

strComputerName = InputBox("Enter the name of the computer you wish to query", "Logon Session Spy")
          If strComputerName = "" Then
               Wscript.Echo "You must enter a valid data string into the computer name field."
               Wscript.Quit
          End If

who = "winmgmts:{impersonationLevel=impersonate}!//"& strComputerName &""
     If Err.Number <> 0 Then
          Wscript.Echo strComputerName & " " & Err.Description
          Wscript.Quit
     End If

Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem")

          For each User in Users    
               Wscript.Echo "The user name for the specified computer is: " & User.UserName
          Next




Best of luck,
Mitch
0
 
carl_legereCommented:
add a line in the login script, which runs a script that does this after establishing drive mappings


ipconfig /all > g:\info_%username%.txt

where g is the letter of a common network location that they can all pile up into after the login in the morning, and then you can see with search (find within document on the root of this folder)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.