LAN IP

Assume I have LAN IP 192.168.20.1

How can I find out the AD user name based on IP address?
LVL 1
ITsolutionWizardAsked:
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.

JustInCaseCommented:
tracert 192.168.20.1 <- should show you path and resolve hostname
nbtstat -a 192.168.20.1 <- NetBios data of host
if reverse lookup zone is created you can use
nslookup 192.168.20.1
bbaoIT ConsultantCommented:
IMPO, i don't think the above methods could help you trace an IP back to the associated user name in AD.

below is some kind of official way to do that.

IP Address Tracking
https://technet.microsoft.com/en-us/library/jj878332.aspx
CamyCommented:
I've got a Powershell script that (assuming you have permissions) will advise of the currently logged on user at a machine?

<#
.SYNOPSIS
 
Find currently logged on user for a given IP / machine name

.DESCRIPTION

n/a
 
.PARAMETER machine
 
 Enter machine to connect to and retrieve logged on user

.EXAMPLE
 
n/a
 
#>

param($machine)

trap {
  write-host "Error connecting to $machine" -fore red
  write-host ""
  continue
}

if ($machine -eq $null) # If no server location given
{
	write-host ""
	$machine = read-host "Enter PC name or IP to read logged on user: "  #Request machine to check
}
 
 if (test-connection $machine -quiet -count 2) #If machine responds to any of 2 ICMP pings
 {
	$user = (gwmi -ea stop -computer $machine -class win32_computerSystem).username
	<#if ($err) #Request admin details to try again
	{
		write-host $Err[0] -Foregroundcolor Red
		write-host " "
		write-host "Enter admin credentials (Domain\Username) to try again: "
		$creds = get-credential
		$user = (gwmi -credential $creds -ErrorVariable Err -ea stop -computer $machine -class win32_computerSystem).username
	}#>
	write-host ""
	write-host "User currently logged onto $machine is $user"
	write-host ""
 }
 else #Machine did not respond to ping
 {
	write-host "$machine did not respond to ping connection test" -Foregroundcolor Red
	write-host ""
 }

Open in new window

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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

JustInCaseCommented:
bbao is right, what I wrote won't help.
;)
I did not read question well, I thought solution is for computer name not user name.
Benjamin VoglarIT ProCommented:
If You are admin and the computer is a domain mamber just simply:

1. nslookup IP_ADDRESS       ->  result is your computername
2. go \\computername\c$\Users     -> users who loged in to the computer
ITsolutionWizardAuthor Commented:
how can i get list of pc name, ad name in that pc, and ip address?
bbaoIT ConsultantCommented:
> how can i get list of pc name, ad name in that pc, and ip address?

if you are talking about alive Windows PCs only, you may use NET VIEW to list the computers in your current domain or workgroup.

to list user names on a specific computer, use NET USER command.

and for ip address? just PING the computer name! :)

FYI

NET VIEW
Displays a list of domains, computers, or resources that are being shared by the specified computer. Used without parameters, net view displays a list of computers in your current domain.
https://technet.microsoft.com/en-us/library/bb490719.aspx

NET USER
How to Generate a List of Users
https://support.microsoft.com/en-us/kb/149781
Mal OsborneAlpha GeekCommented:
Another option might be to install a WINS server.  Windows clients register user names as well as machine names on a WINs server. All versions of Windows Server from NT4 to 2012R2 include it.

Once machines and users are registered, it is easy to look up a user based on an IP address in the console.
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
Networking

From novice to tech pro — start learning today.