Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / February 2008

Tip: Looking for answers? Try searching our database.

LDAP for Windows XP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mag - 12 Feb 2008 21:49 GMT
Hi,

I have a windows application that requires security login and I would
like to retrieve the windows XP user ID and Password to compare it
with their entries to the application.  Any help would be very much
appreciated due to short deadline.  I do not think I have the right
LDAP for XP.

Some of my code:

Dim sRoot As String = "LDAP://"

       _windowsLogin = Me.txtUserID.Text
       _windowsPswd = Me.txtPassword.Text

       Dim objRootEntry As DirectoryEntry = New DirectoryEntry(sRoot,
_windowsLogin, _windowsPswd, AuthenticationTypes.Secure)

Thanks,

Mag
Joe Kaplan - 13 Feb 2008 03:14 GMT
Are you trying to authenticate a user in Active Directory or on the local
machine?  You can't authenticate local machine users with LDAP.

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> Hi,
>
[quoted text clipped - 17 lines]
>
> Mag
mag - 13 Feb 2008 18:04 GMT
On Feb 12, 10:14 pm, "Joe Kaplan"
<joseph.e.kap...@removethis.accenture.com> wrote:
> Are you trying to authenticate a user in Active Directory or on the local
> machine?  You can't authenticate local machine users with LDAP.
[quoted text clipped - 28 lines]
>
> - Show quoted text -

Thanks for your response,
I am actually trying to uthenticate the user of a local machine.  Is
there a way to do that?
Joe Kaplan - 13 Feb 2008 19:17 GMT
I'd suggest doing a p/invoke of the LogonUser API.  This is probably the
best way and will work with either type of account (domain or local).

The PrincipalContext object in .NET 3.5 can authenticate users in AD, ADAM
or SAM (local machine), but I've heard reports that the SAM support
sometimes provides mysterious results.

You can also try using the WinNT provider for S.DS instead of LDAP, but I
don't know if that will work reliably either.

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

On Feb 12, 10:14 pm, "Joe Kaplan"
<joseph.e.kap...@removethis.accenture.com> wrote:
> Are you trying to authenticate a user in Active Directory or on the local
> machine? You can't authenticate local machine users with LDAP.
[quoted text clipped - 32 lines]
>
> - Show quoted text -

Thanks for your response,
I am actually trying to uthenticate the user of a local machine.  Is
there a way to do that?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.