473,382 Members | 1,705 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,382 software developers and data experts.

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, strAttributeList, txtCommandText As String
'On Error GoTo Err_ThisSub
' Open a Connection object.
con.Provider = "ADsDSOObject"
con.Properties("ADSI Flag") = 1
txtService = ""
If txtService = "AD" Then
strAttributeList =
"sAMAccountname,displayName,distinguishedname,memb erOf"
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>;(sAMAccountname=" &
Me.txtUserName & ");" & strAttributeList & ";subtree"
Else
strAttributeList =
"dn,cn,fullname,givenname,groupmembership,employee number,mail"
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=marc1tim);"
& strAttributeList & ";subtree"
End If

' Create a command object on this connection.
Set Com.ActiveConnection = 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).Type = vbVariant And Not
(IsNull(rs.Fields(i).Value)) Then
For j = LBound(rs.Fields(i).Value) To
UBound(rs.Fields(i).Value)
Me.txtOutput = Me.txtOutput & rs.Fields(i).Name & " : "
& CStr(rs.Fields(i).Value(j)) & vbCr & vbLf
Next j
Else
Me.txtOutput = Me.txtOutput & rs.Fields(i).Name & " : " &
rs.Fields(i).Value & 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 1501

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

Similar topics

5
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...
7
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...
1
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...
4
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...
4
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...
2
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
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...
2
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.