Re: How to get hashed password of current user

From: Joe Kaplan \(MVP - ADSI\) (
Date: 10/18/04

Date: Mon, 18 Oct 2004 00:31:41 -0500

Ah, have you tried Context.User.Identity.Name? That will give you the
logged on user's NT account name. If you want their SID, you will need to
do some p/invoke code on to look it up from their token. Note that this
will also work for domain users as well.

Is this what you were looking for?

Depending on how the user authenticated, you might be able to get the
password too (this is very easy with Basic authentication), but otherwise
you can't to my knowledge.

Joe K.

"Gawel" <> wrote in message
> Joe Kaplan (MVP - ADSI) wrote:
>> I don't quite understand what you are asking here. Are you asking for
>> unique identifiers for users in AD? If so, objectGUID and objectSID are
>> good bets, with objectGUID being better for a variety of reasons (rename
>> and domain move safe, fixed length, easy to store in SQL, etc.).
>> If not, can you elaborate? Normally people only want to know the
>> password data when they are trying to authenticate or sync (or hack).
> Ok, I was not precise enough. I have standalone computer wiht
> Windows XP. No AD. And in this case I would like to get
> programatically any infomation that is specific for current
> logged user. It can be hashed password, or any other information.
> What is more this user will be Asp.Net user.
> gawel