How to extract the NT username from NTLM message?

From: darin dimitrov (darin_dimitrov_at_hotmail.com)
Date: 08/06/04


Date: 6 Aug 2004 05:54:31 -0700

Hello,

    I would like to implement a server side script that extracts the
NT username from the "Authirization:" header that is sent from the
client. I configured IIS to use Windows Authentication and disabled
anonymous access in order to force the client send its credentials.
The authorization header that I receive in the last stage of the
negociation is of the form:

Authorization: NTLM TlRMTVNTUAADAAAAGAAYAHIAAAAYA<Truncated>

    I know that in ASP.NET we can use the AUTH_USER, LOGON_USER or
REMOTE_USER server variables in order to obtain the login information,
but I don't use ASP and I need to implement a parser that will be able
to do this.

    So my question is: Does the "Authorization" header mentioned above
contains the username of the person who accessed my script? If the
answer is "yes" then could you please point me to some interesting
articles that discuss how to extract the username from such a header
using the .NET framework? I have read through the The NTLM
Authentication Protocol (http://davenport.sourceforge.net/ntlm.html)
but it didn't help me much - I find it difficult to implement. Thanks
in advance for any suggestions.



Relevant Pages

  • Re: Strange Problem with Authentication Has anyone ever run across
    ... Thank you VERY VERY VERY Much for your Help Anthony. ... workgroup, or from another domain, or with a different account - for example ... You might try rejoining the client to the domain, ... Some Drives Map the one on the Main DC does not but promps for username ...
    (microsoft.public.windows.server.general)
  • Re: Cant send back null class reference as SOAP Header?
    ... State is maintained on the server (no ... the client actually maintains the key to the state ... If they then retry the request, the flag won't be sent, will it? ... The header is defined as Direction.InOut on every ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Strange Problem with Authentication Has anyone ever run across
    ... No General client problems. ... Some Drives Map the one on the Main DC does not but promps for username ... on the Share permissions Administrators Full Control, ... Anthony, http://www.airdesk.com ...
    (microsoft.public.windows.server.general)
  • Re: Problems signing request when using Windows Authentication
    ... Even though a web-based UI may be set up for Windows authentication, ... >>> In the client I add a username token to the request. ... >>> security tokens in the request.", ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: No username prompt SSHD
    ... it is the client side. ... The client takes the current user and passes that to the server as the ... To override this you must supply a username to the client in one of two ways: ... $ ssh -l login serveur ...
    (SSH)