Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 12 Feb 2008 13:49:29 -0800 (PST),    group: microsoft.public.dotnet.security        back       


LDAP for Windows XP   
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
date: Tue, 12 Feb 2008 13:49:29 -0800 (PST)   author:   mag

Re: LDAP for Windows XP   
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.

-- 
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"mag"  wrote in message 
news:c0731512-92da-4959-8c44-0304be0d6fd2@e10g2000prf.googlegroups.com...
> 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
date: Tue, 12 Feb 2008 21:14:27 -0600   author:   Joe Kaplan

Re: LDAP for Windows XP   
On Feb 12, 10:14 pm, "Joe Kaplan"
 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.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"http://www.directoryprogramming.net
> --"mag"  wrote in message
>
> news:c0731512-92da-4959-8c44-0304be0d6fd2@e10g2000prf.googlegroups.com...
>
>
>
> > 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- Hide quoted text -
>
> - 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?
date: Wed, 13 Feb 2008 10:04:31 -0800 (PST)   author:   mag

Re: LDAP for Windows XP   
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.

-- 
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"mag"  wrote in message 
news:223bc52b-9f58-43e2-aea9-99bf2eedc038@v4g2000hsf.googlegroups.com...
On Feb 12, 10:14 pm, "Joe Kaplan"
 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.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services 
> Programming"http://www.directoryprogramming.net
> --"mag"  wrote in message
>
> news:c0731512-92da-4959-8c44-0304be0d6fd2@e10g2000prf.googlegroups.com...
>
>
>
> > 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- Hide quoted text -
>
> - 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?
date: Wed, 13 Feb 2008 13:17:15 -0600   author:   Joe Kaplan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us