How can I remotely tell who is logged on at a machine?

John Savill

March 4, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The easiest way to do this is to use the NBTSTATcommand. There are two ways to use this command depending on if you know themachines name or just its IP address. If you know the machines name enter thecommand

nbtstat -a
e.g. nbtstat -a pdc

The output will be of the format:

NetBIOS Remote Machine Name Table

Name Type Status
---------------------------------------------
PDC <00> UNIQUE Registered
PDC <20> UNIQUE Registered
SAVILLTECH <00> GROUP Registered
SAVILLTECH <1C> GROUP Registered
SAVILLTECH <1B> UNIQUE Registered
SAVILLTECH <1E> GROUP Registered
PDC <03> UNIQUE Registered
SAVILLJ <03> UNIQUE Registered
SAVILLTECH <1D> UNIQUE Registered
INet~Services <1C> GROUP Registered
..__MSBROWSE__.<01> GROUP Registered
IS~PDC.........<00> UNIQUE Registered

MAC Address=00-A0-24-B8-11-F3

The user name is the <03>.

If you only know the IP address use the command

nbtstat -A
e.g. nbtstat -A 10.23.23.12

The output is the same and notice we just use a capital Ainstead of a lowercase a.

This will only work if the remote machine in question is running it'smessenger service, otherwise the username is not returned.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like