473,660 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NDS authenication via LDAP

Tim
Hello,
I'm trying very (too) hard to log uses LDAP (via ADSI) to autheniticate
users in an A2k2 application. We have AD and I have that working
slick. We are in a tranistion from NDS to AD and I would like to get
the NDS side working during the transition. I know the concept of what
required
Microsoft's information is very sparse and incomplete if not wrong.
1) What would the provider be (and how do we know if I/others have it)
2) What's require in the commandtext (some say LDAP://.. other say
NDS://.. neither work)
3) I'm assuming the context in required with user name but in what
format?
4) What is the ASDI flag?
Keep in mind this code only works on the AD side (txtService = "AD").
This code (with a blank txtService) gives me a "Table does not exist"
error. What table?

_______________ _______________ ____________
private sub testlogin
Dim con As New Connection, rs As New Recordset, txtService As String

Dim adVariant
Dim i, j 'Used for counter
Dim Com As New Command
Dim strDomain, strPassword, strAttributeLis t, txtCommandText As String
'On Error GoTo Err_ThisSub
' Open a Connection object.
con.Provider = "ADsDSOObje ct"
con.Properties( "ADSI Flag") = 1
txtService = ""
If txtService = "AD" Then
strAttributeLis t =
"sAMAccountname ,displayName,di stinguishedname ,memberOf"
con.Properties( "User ID") = "ad\" & Me.txtUserName
con.Properties( "Password") = Me.txtPassword
con.Open "Active Directory Provider"
txtCommandText =
"<LDAP://servername/OU=x,OU=y,DC=z, DC=a>;(sAMAccou ntname=" &
Me.txtUserName & ");" & strAttributeLis t & ";subtree"
Else
strAttributeLis t =
"dn,cn,fullname ,givenname,grou pmembership,emp loyeenumber,mai l"
con.Properties( "User ID") =

"cn=username,ou =User,ou=y,o=z"
con.Properties( "Password") = Me.txtPassword
con.Open "NDS Provider"
txtCommandText =

"<LDAP://servername/cn=userid,ou=b, o=a>;(cn=marc1t im);"
& strAttributeLis t & ";subtree"
End If

' Create a command object on this connection.
Set Com.ActiveConne ction = con
Com.CommandText = txtCommandText
' Set search preferences.
Com.Properties( "Page Size") = 1000
Com.Properties( "Timeout") = 30 'seconds
' Execute the query.
Set rs = Com.Execute
' Navigate the record set.
rs.MoveFirst
Me.txtOutput = Null
While Not rs.EOF
For i = 0 To rs.Fields.Count - 1
If rs.Fields(i).Ty pe = vbVariant And Not
(IsNull(rs.Fiel ds(i).Value)) Then
For j = LBound(rs.Field s(i).Value) To
UBound(rs.Field s(i).Value)
Me.txtOutput = Me.txtOutput & rs.Fields(i).Na me & " : "
& CStr(rs.Fields( i).Value(j)) & vbCr & vbLf
Next j
Else
Me.txtOutput = Me.txtOutput & rs.Fields(i).Na me & " : " &
rs.Fields(i).Va lue & vbCr & vbLf
End If
Next i
rs.MoveNext
Wend

rs.MoveLast
rs.Close
Set rs = Nothing
Exit_ThisSub:
Exit Sub
Err_ThisSub:
MsgBox Err.Number & ": " & Err.Description , , "Login Error"
Resume Exit_ThisSub
End Sub

Nov 13 '05 #1
0 1519

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

Similar topics

5
2867
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate thread. I'm bidding on a PHP intranet development contract. One of the specific requirements is that the app interface with the company's existing Open LDAP server for user authentication.
7
6797
by: Amar | last post by:
I am trying to connect to my college LDAP directory using ASP.NET. This LDap does not have security as it returns only user demographic information. i do not need to bind with a username or credentials. What i am trying to do is, i am trying to look up all the information for the user with user id 'testuser'. The following is the Vb.net code for my aspx page: Dim oRoot As DirectoryEntry = New...
1
3738
by: Angel | last post by:
Hello all - I have a LDAP service running on a NT4 box (not a mbr of my AD domain), I'd like to extract the users/attributes from that LDAP service and populate my AD domain with those users and attributes (the user accounts in LDAP will go into AD and the attributes for those users will go into SQL Server 2000 database). Does anyone know of a tool or how I can go about doing this? (the SQL server is a mbr of the AD domain) MS didn't...
4
27935
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net gives the following error: System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb). after googling for a long time i found out that many other have the same
4
6573
by: Terry Miller | last post by:
I have DB2 V8.2 loaded on a Redhat Enterprise Linux version 3 (RHEL 3) box. RHEL is configured to talk to LDAP for authenticaton besides the local passwd file. I can verify this by executing an su to a User Id that exists in LDAP and not in the local /etc/passwd file. Also verified that the connection to LDAP is working by ssh into the box. The problem I have is when I try to connect to a local DB2 Database using a User Id and Password...
2
3250
by: duncan beaumont | last post by:
Hi, - SQLserver 2000 - Yellowfin 2.4 - Windows 2003 server I have been asked to investigate seting up LDAP authentication to access our Yellowfin reporting.
0
3222
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have given all the attributes which are needed, for the user, in the code and also the proper path where the user has to be added. Please have a look at my code CODE] // This is a class file which stores all the info required for the user
2
2349
by: Angel666 | last post by:
We are using forms authenication with AJAX update control panels. We get various results but no redirect when the user has timed out and is no longer authenicated and does a asyncpostback. We have tried onasyncpostbackerror method but it is not even hitting the code behind. Because the server does try to redirect to login page we get the parser error(below) as it is trying to parse the login page in the background.
0
1842
by: Sells, Fred | last post by:
I'm running python 2.5 (or 2.4) in an XP environment. I downloaded and installed the .dll's from OpenLDAP-2.4.8+OpenSSL-0.9.8g-Win32.zip and copied the .dll's in c:/windows/system32 as instructed now I get this error. Is there anyway to avoid building the python_ldap binaries? Apart from being lazy, I've got a secure system policy issue if I start compiling apps. I could give up and just start running in linux, but myxp environment is...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8754
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.