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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jay_Jay70Commented:
Hi kwoznica,

nbtstat - a ip address

will tell you all!

Cheers!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jay_Jay70Commented:
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
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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
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
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)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.