Sunday, August 30, 2009

How do I tell who is logged into a remote Windows box?

On Windows you can try:
C:\>nbtstat -a somebox
Local Area Connection:
Node IpAddress: [192.168.22.68] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
testbox2<00> UNIQUE Registered
MYADS <00> GROUP Registered
testbox2<03> UNIQUE Registered
MYADS <1E> GROUP Registered
JDOE 03> UNIQUE Registered

MAC Address = 00-04-76-39-A9-F9
C:\> But if Netbios over TCP/IP it turned off it won't work.
In that case you may have to use a WMI script, but you would have to be an Admin on the remote box. On Unix:

bash-2.05# nmblookup -S somebox
querying testbox2 on 192.168.31.255
192.168.22.59 somebox <00>
Looking up status of 192.168.22.59
testbox2 <00> - M
MYADS <00> - M
testbox2 <03> - M
MYADS <1e> - M
JDOE <03> - M

bash-2.05# The above will only work is the Windows box has Netbios over TCP/IP it turned on.

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

No comments:

Post a Comment

Hey Guys! Thanks for visiting my blog. Hope you enjoy reading. Just leave your comments if you think this post is a worth readable! Your valuable comments are always welcomed. Please don't spam! and No abusive language would be tolerated. I would moderate your feedback and then it would be published. If you have any query I will try to give feedback as soon as possible.