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

  • Thread starter Homer J. Simpson
  • Start date
H

Homer J. Simpson

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
 
S

Steve Jansen

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
 
H

Homer J. Simpson

Steve, Thanks for your answer.
I'll check it ASAP.
Regards,
J.Philippe
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top