473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Help -- Authenticating user against LDAP using ASP

I have been strugling with this one for few weeks now. I hope to get
some help here.

Following code works fine, except that I have to hard-code the user's
fullpath (2nd parameter of the OpenDSObject() method).

Here is the code:

--------------------------
sub login5(uid, password)

Dim userName, ldapserver, dso, lobjUser, ldap_path

ldap_path = "LDAP://servername/dc=domain,dc=com"

userName =
"uid=#userid#,ou=int7,ou=internal,ou=people,c=us,c n=users,dc=campbells,dc=com"

userName = Replace(userName, "#userid#", uid)

' Connect to the LDAP Directory
Set dso = GetObject("LDAP:")
'Validate the User Name and Password
Set lobjUser = dso.OpenDSObject(ldap_path, userName, password, 0)

If Err.number <> 0 Then
Response.Write "AUTHENTICATION FAILURE!"
Set lobjUser = nothing
Set dso = nothing
Else
Response.Write "SUCCESS!"
end if

end sub

-------------------------

For this this work, I need to know exact path of the user (i.e.
userName =
"uid=#userid#,ou=int7,ou=internal,ou=people,c=us,c n=users,dc=campbells,dc=com")

Is there anyway to do something like:

userName = "uid=#userid#,ou=*,ou=*,ou=*,c=*,cn=*,dc=campbells ,dc=com"
Thanks

Jul 22 '05 #1
0 2507

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Smitro | last post by:
Hi, I'm looking for a Tutorial about Authenticating using PHP and Linux User Accounts. Can some one point me in the right direction? Smitro
3
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and...
0
by: DejaUser | last post by:
I have been strugling with this one for few weeks now. I hope to get some help here. Following code works fine, except that I have to hard-code the user's fullpath (2nd parameter of the...
0
by: Ram | last post by:
Hi All How to use C# for Authenticating a NDS server using LDAP. please give me a solution ASAP Thanks, Ram
3
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 ...
3
by: David | last post by:
Hi, I've had a quick look but cannot find a module that will let me authenticate against Kerberos. There appears to be a krb5 module that hasn't been updated for a long time and I can't find...
10
by: Jeff Williams | last post by:
How can I get a list of the Groups both Local and Domain groups a User belongs to.
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: Nandagopal | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and C#": But I am having a problem figuring out the LDAP:// The LDAP:// that I pass looks...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.