473,503 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2526

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

Similar topics

6
2840
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
814
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
487
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
985
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
16421
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
6956
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
26774
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
5518
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
1187
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
7353
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...
1
7011
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
7468
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
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
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...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.