Newbie question How to get a SAM (NT4) profile using System.DirectoryServices

Discussion in 'ASP .Net Security' started by Homer J. Simpson, Nov 4, 2003.

  1. Hi there,

    I'd like to get a full SAM user's profile, while connecting to my Intranet
    Site.
    Authentication mode is set to Windows(Integrated) and i'm actually playing
    with System.DirectoryServices to query the SAM

    My question is : Is there a way to get a full user profile (ie :fistname,
    lastname, phone, ...) WITHOUT knowing the user's password.
    As you may guess, the only known information to me is given by
    Request.ServerVariables("AUTH_USER")
    Should i access the SAM with an adminsitator ID and pwd to do this ?
    Where to begin ?
    Any help would be appreciated.

    Thanks in advance,
    Regards
    --
    .....................................................................
    Homer J. Simpson
    Duff Valuable Professionnal - Donuts & Onion Rings Certified
    .....................................................................
    Homer J. Simpson, Nov 4, 2003
    #1
    1. Advertising

  2. Homer J. Simpson

    Steve Jansen Guest

    I would check out references about using ADSI to query the NT4 SAM.

    That information will describe the schema and permissions for the
    "Winnt://" directory service moniker that you need to use the
    System.DirectoryServices classes.

    VBScript ADSI code might look like this:

    Dim User
    Set User = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
    Response.Write User.Fullname


    Homer J. Simpson wrote:

    > Hi there,
    >
    > I'd like to get a full SAM user's profile, while connecting to my Intranet
    > Site.
    > Authentication mode is set to Windows(Integrated) and i'm actually playing
    > with System.DirectoryServices to query the SAM
    >
    > My question is : Is there a way to get a full user profile (ie :fistname,
    > lastname, phone, ...) WITHOUT knowing the user's password.
    > As you may guess, the only known information to me is given by
    > Request.ServerVariables("AUTH_USER")
    > Should i access the SAM with an adminsitator ID and pwd to do this ?
    > Where to begin ?
    > Any help would be appreciated.
    >
    > Thanks in advance,
    > Regards
    Steve Jansen, Nov 6, 2003
    #2
    1. Advertising

  3. Steve, Thanks for your answer.
    I'll check it ASAP.
    Regards,
    J.Philippe
    "Steve Jansen" <> a écrit dans le message de news:
    ...
    > I would check out references about using ADSI to query the NT4 SAM.
    >
    > That information will describe the schema and permissions for the
    > "Winnt://" directory service moniker that you need to use the
    > System.DirectoryServices classes.
    >
    > VBScript ADSI code might look like this:
    >
    > Dim User
    > Set User = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
    > Response.Write User.Fullname
    >
    >
    > Homer J. Simpson wrote:
    >
    > > Hi there,
    > >
    > > I'd like to get a full SAM user's profile, while connecting to my

    Intranet
    > > Site.
    > > Authentication mode is set to Windows(Integrated) and i'm actually

    playing
    > > with System.DirectoryServices to query the SAM
    > >
    > > My question is : Is there a way to get a full user profile (ie

    :fistname,
    > > lastname, phone, ...) WITHOUT knowing the user's password.
    > > As you may guess, the only known information to me is given by
    > > Request.ServerVariables("AUTH_USER")
    > > Should i access the SAM with an adminsitator ID and pwd to do this ?
    > > Where to begin ?
    > > Any help would be appreciated.
    > >
    > > Thanks in advance,
    > > Regards

    >
    Homer J. Simpson, Nov 8, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward
    Replies:
    1
    Views:
    2,403
    Edward
    Jul 8, 2003
  2. Chad Beckner
    Replies:
    3
    Views:
    10,021
    Chad Beckner
    Aug 11, 2005
  3. Nam
    Replies:
    2
    Views:
    4,461
  4. Nam

    Error using System.DirectoryServices

    Nam, Jan 9, 2008, in forum: ASP .Net Security
    Replies:
    2
    Views:
    214
  5. BT Ong

    Using System.DirectoryServices from within webservice

    BT Ong, Sep 1, 2003, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    187
Loading...

Share This Page