Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TCP/IP command to resolve username to his current IP address?

Posted on 2004-11-05
29
Medium Priority
?
4,662 Views
Last Modified: 2008-01-09
Hi! I need to know what the TCP/IP command(s) is(are) to resolve a user on a TCP/IP network (Windows 2000) to
his currently assigned IP address. I can not use any admin tools/utilities. The network utilizes DHCP.

Please help.

Many Thanks in Advance,

--Mike
0
Comment
Question by:mikezat
  • 6
  • 5
  • 3
  • +9
29 Comments
 

Expert Comment

by:CyberQuad
ID: 12507022
Start, Run, cmd (opens a command prompt)
nbtstat -a x.x.x.x
0
 

Author Comment

by:mikezat
ID: 12507104
Hi CyberQuad! I was asking to resolve a user to his IP. For instance, if the username is MICHAELD, how can I find out what the user's IP is ? Sorry if I did not make it clear in my original question
0
 
LVL 4

Expert Comment

by:thribhu
ID: 12507123
start run cmd
 type  netstat -a shows ip along with port binded..........
netstat -r shows routing table..........
check this too   arp -a
start run type winipcfg shows the network details
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
LVL 4

Expert Comment

by:thribhu
ID: 12507209
let us say ip the username resolvs to MICHAELD , then

start run type ping MICHAELD(if the system name is MICHAELD)  -t

u get the ip.......

If u dont mean this and if u want to ping the user then u can go for 3rd part tools...

http://www.komododigital.com/
0
 

Expert Comment

by:CyberQuad
ID: 12507220
If you have an e-mail from him, you may see the IP address if you look in the header of the e-mail. Then take that IP address and nbtstat -a x.x.x.x

If you can find his computer name, you can also do nbtstat -a computername
0
 
LVL 5

Expert Comment

by:Big5250
ID: 12507260
If your system is running WINS, you can use the WINS Admin to search for the users name.
0
 

Author Comment

by:mikezat
ID: 12507322
Hi! No, I do not have an email from the user and I do not know the name of his PC to ping. All I know is the persons USERNAME. Based on the username I need to figure out the PC's name and then ping.

I am increasing point difficulty for this question.

P.S. I can not use any 3rd party tools :-(
0
 

Expert Comment

by:sysbot
ID: 12507378
This is maybe possible typically depends on if you're on a workgroup type of network or are you, your computer and the other user is on a domain network? Or is this over the internet?

This bring us to which USERNAME are you talking about? His logon user name? his IM username? his email username?

You need to be much more specific.
0
 

Author Comment

by:mikezat
ID: 12507455
Hi sysbot!

Thank you for taking a look. This is an internal Windows2000  based network and the USERNAME I am talking about is the network LOGON name.

Thank you in advance,

--Mike
0
 
LVL 8

Expert Comment

by:kain21
ID: 12507624
without admin tools it's difficult... can you open computer management?  if so... open it.. right click on computer management and click connect to another computer... type the name of your domain controller... expand shared folders and click on sessions and see if the user is listed... if he's logged into the domain he should be listed...
0
 
LVL 3

Expert Comment

by:ccceqo2
ID: 12508005
If you are using active directory it is possible to write an ldap query that will locate the user.
Unfortunately I do not know how to do this.
0
 
LVL 4

Accepted Solution

by:
thribhu earned 800 total points
ID: 12508464
with the resources u have it is not possible man
0
 

Expert Comment

by:dneumannjr
ID: 12508844
To resolve the Host Name to ip address I simply click on start > Run > CMD. At the command prompt type Ping -a MichealD this should resolve the host name to IP and vise versa.

Hope this helps. Ping -t is a continuous ping by the way.

Dave Jr
0
 
LVL 8

Expert Comment

by:kain21
ID: 12508895
he's looking for the username... not hostname... i think thribhu has the answer...
0
 

Expert Comment

by:dneumannjr
ID: 12509011
Yup, sorry about that I just realized that. Excuse me while I chew on my foot for awhile :)
0
 

Expert Comment

by:joshuascott94
ID: 12509059
What you are asking for is not impossible, but I don't think there is a straight forward way of doing it.  Here are some ideas on how to get what you need.  Please note that these are just ideas and recommendations.

First thing...are you running Windows DHCP?  I'd recommend enabling DHCP logging on your DHCP servers.  A quick search on Microsoft's site for "Enable DHCP logging 2000" showed many results with instructions.  Most of the links are for Windows 2003, but the method to enable logging should be similar.  This log combined with the  log that shows dynamic DNS updates (if used), might provide the necessary info to link username to IP address.  

If DHCP logging doesn't provide the necessary info, then another possibility is to take the script included in the link below and modify it to run through each IP address in your DHCP scope.  That will give you the username logged into each computer.  The script could be customized to create a simple text file with username and IP address.  Then you can use the search capabilities within notepad or a windows grep tool to find the IP address of a supplied username.  This could be something that is run at regular intervals so that you'll have an up to date list of mappings.  The effectiveness of this option depends on the size of your network.  If you want to do this for a enterprise network with thousands of users, then this might take a while and bandwidth needs to be taken into account.  However, for a smaller network, this should work fine.
http://www.microsoft.com/technet/scriptcenter/scripts/desktop/logon/dmlgvb02.mspx

As mentioned, these are only ideas off the top of my head.  I know that it is possible to get that info, but its just not that straight forward.

Good luck!
0
 
LVL 8

Expert Comment

by:kain21
ID: 12509083
yeah.. but can you get it without administrator priveleges?
0
 

Expert Comment

by:joshuascott94
ID: 12509172
Try it out.  Take that script and substitute an IP address of a remote system in place of the computer name that is listed while logged on as a normal user.  
0
 

Author Comment

by:mikezat
ID: 12509222
Thank you, joshuascott94 . The script takes the PC name and the PC name is what I am trying to find out
based on known username. If I had known the PC name, I would just ping it to get the IP address.


I am increasing points for this question.

Many Thanks,

--Mike
0
 

Expert Comment

by:joshuascott94
ID: 12509240
You can use an IP address in place of the computer name.
0
 

Author Comment

by:mikezat
ID: 12509336
Thank you, joshuascott94! I think we are not on the same step.
Please read all my posts to see what I am looking for.
All I am trying to do is to figure out the IP ADDRESS of a PC based on the
logon USERNAME.

For instance, if you have a user on your network let's say called SAMD (Samuel Derekson)
1) I need a TCP/IP command to give me his PC NAME (let's say D00123456)
2) Once I get his PC NAME I can ping it to get the IP ADDRESS

Perhaps there is a way to do it in one step.
I remember I did it 4-5 years ago, but since then I've been dropped on my head and
can not remember how I did it

Many Thanks in Advance,

--Mike
0
 

Expert Comment

by:joshuascott94
ID: 12509514
I did read all of the posts and understand exactly what you are looking for.  There is not an easy way to get the IP ADDRESS of a PC based on the logon USERNAME.  The IP address is assigned via DHCP before any authentication events ever happen so DHCP will not have the username stored anywhere.  WINS would be your best bet, but after reading the posts it sounds like you do not use WINS.  So, the only way to obtain this information without WINS or some sort of management system would be to query each individual IP address on your network to build a database of USERNAME, PC, and IP ADDRESS entries.  That is what the script I was recommending would help with.  It would build that database, or file, and you would simply search that file for the username in question.  The search results would give you IP address and computer name.

As mentioned above, WINS would make this much easier due to the fact that WINS stores both the username and IP address of the system.  This is not foolproof either, because a user might have be logged onto more than one system.
0
 
LVL 1

Expert Comment

by:Steviek411
ID: 12511383

Can you create a script that this user can run? For example create a script that says if Username = SAMD then write ipconfig to a text file and copy to a certain location. This would be perfect if you can make this as part of a login script.
Here is a sample

In your batch file add these lines

ipconfig > %username%.txt
copy %username%.txt c:\windows        ( or you can make this a network drive)

Quick and simple.
0
 

Author Comment

by:mikezat
ID: 12511652
Hi ! Thank you joshuascott94 and Steviek411. None of these solutions is possible.
I can not build a database/file and I can not ask the user to run any scripts :-(

Many Thanks,

--Mike
0
 
LVL 3

Expert Comment

by:ccceqo2
ID: 12512047
This is simplest but requires all users to have the messenger service started (which is the default). No, not the chat program, messenger service lets you send a message to a PC using "net send ....":
http://cwashington.netreach.net/depo/view.asp?Index=798&ScriptType=command

As I mentioned earilier, the info IS in active directory you just need a way to get it out. Subscription but you can get the code and look at it for free:
http://www.winnetmag.com/WindowsScripting/Article/ArticleID/39857/39857.html

Maybe you ARE running WINS?
http://www.winnetmag.com/Windows/Article/ArticleID/26227/26227.html

Ok, you said no admin utils, but you should be able to run these as a user, and you can easily get them onto the PC by cut and pasting the code.

This one is more friendly, still free, but not sure if you are going to be able to install it?

http://www.sharewareriver.com/product.php?id=7792
0
 

Expert Comment

by:joshuascott94
ID: 12512078
Mike,

It sounds like you're not able to run any scripts on any workstations or servers including your own, you don't have WINS running, you can't use 3rd party tools, and you can't use any admin tools/utilities.  Can you please explain how you would like to accomplish this task and what you can use?  Based on the info you've given, I'd have to agree with thribhu that this is not possible.

Sorry that I couldn't help.  Good luck.
0
 

Expert Comment

by:sysbot
ID: 12512151
Okay. Let me know some more about your network. Do you have administrator permission on the network? Or are you just a typical user?

If you are an administrator this is definately easy.

If you're a regular user just like the other user then it's much more challenging.

Is your network on a switched networked or on a hub? If the computers are connected together using a switch then it make it harder to sniff for the username.

Provide more information about your network. There are bunch of ways to go about it but depends on your network there maybe be a very limited answers/solutions.
0
 
LVL 1

Expert Comment

by:mweehcx
ID: 12512320
Hi,


On Command Prompt,
C:\>IPCONFIG <enter>  \\this command will show the current settings of your IP
C:\>IPCONFIG /RELEASE <enter> \\this command will release the current IP on machine
C:\>IPCONFIG /RENEW <enter> \\This command will renew the IP on local machine from your server

so please follow your steps to update your IP from your DHCP Server. or you cand type IPCONFIG/? for help

Hope helps.

Wee
0
 
LVL 2

Expert Comment

by:wjc7662
ID: 12515560
Does the user (victim) consistantly use the same machine? (i am assuming these are public-not personal-machines)
If so, and you can get on this machine at some point when he isn't there, you could retreive the current (though changing) ip address.  But MORE importantly the static, non-changing MAC address (sometimes referred to as the physical address)  Once you have the MAC address of the machine that the user is using, you have him.  (that is unless he changes computers or network cards)  once you have the mac address, you can ping those ip address attached to your local subnet and cross reference the mac address to your ARP cache.  The ARP table is populated when your network interface communicates with any other network interface (such as by a ping)  Your ARP cache expires every 60 seconds on a Windows machine.  To view this you will need to type "arp -a" from the command prompt on the machine that your are pinging from.  This is somewhat time consuming, but it is definately the only way given the situation you have described
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question