• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1348
  • Last Modified:

find username from active directory using ipaddress

I want to get the user name from active directory using an ip address of the machine from which the user logged in from.

I was wondering if it is possible to find the user name from Active directory or any other form?
0
kiran_madala
Asked:
kiran_madala
1 Solution
 
madison perkinsNetwork AdministratorCommented:
Please clarify.

Would you like to know who is logged into a workstation?
Yes
Would you like to know the ip address of a workstation?
Yes
Would you like to query active directory for a username?
Yes

Would you like to query a machine name, return the ipaddress, deternime the user logged into the machine and return user object information such as first name last name?
Yes
do you want to know who is logged on locally to a remote machine?
the answer is pstools.
http://technet.microsoft.com/en-us/sysinternals/default.aspx
psloggedon \\computername -l -x
psloggedon \\computername



0
 
quihongCommented:
I don't think that is directly possible since Active Directory doesn't store that information (by default).

However, depending on how your network is setup, you can try to pull the username via NetBios.

Try opening a command prompt and using NBTSTAT

"nbtstat -A IPAddress"

The line with "<03>  UNIQUE" should be the username.

0
 
PlaceboC6Commented:
Quihong is right.

Using NBTSTAT you can find out the name of who is logged in.  Of course this requires that you have netbios enabled on the systems in questions (which it is by default).
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
kiran_madalaAuthor Commented:
Thanks for all the answers. The scenario is

In a domain environment maintained by Active Directory when the user logs and if allowed to access internet then he/she is give a internet lease in which case there should be a mapping between the user logged in an the ip address.

My application is on a 3rd party server which receives the ipaddress from where the request was made. so using that ip address I need to find the user who made the request (The user who is currently logged in from that machine and using the internet).

I am not completely sure but As far as I know the AD might be updating the DNS with this info otherwise how would some one know at what time the internet was accessed by a particular user.

What is the equivalent command of NBSTAT in linux?
0
 
quihongCommented:
Did I not answer the question?
0
 
quihongCommented:
There isn't any since Linux does run netbois.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now