Question : Lotus Notes LDAP

Im trying to get a contivity 600 vpn device to use LDAP to authenticate vpn users. Im trying to use the ldap from my Notes server, If I put in the contivity a base dn of o=MYDOMAIN, it works and allows all users to authenticate. I would like to limit it so only users in the Lotus Notes group called VPNClients can connect.

Any ideas on how I could limit this? I am not very familiar with ldap queries.

Below are the fields in the contivity that I can fill out& With the current settings it allows any user in the domino directory to connect, I would like to limit it to the VPNClients group.

Base DN = o=MYDOMAIN
Server = my notes server ip
Username Attribute = uid
User password attribute = I did not set it
LDAP Filter = I did not set it

Thanks in advance for any help!

Answer : Lotus Notes LDAP

Well here is a general agent to change any field in the Address book based on a group. It is designed originally to change the Mail server field but can be adapted to anything.

You can elimiate manual input prompts where needed. This agent would go in the Address book. I would protect it using a hide/when with an ACL role.

Change Mailserver For A 'Group' Of Users Change the Mail server or any field for a group.

Wil Conway
12 May 2000, Rating --- (out of 5)
 
This code allows you to change the mailserver for all users listed in a group.
It could easily be modified to change any field in a person document.

Code
-----------

Sub Initialize
On Error Goto Error_Handler
'===============================================================================
========
' AGENT INTRODUCTION
'===============================================================================
========
Continue = Msgbox ("This agent will change the mailserver entries for all
users in a group" & Chr(13) _
& "that you specify with the server that you specify." & Chr(13) _
& "Do you still wish to continue?",68,"'Change Mailserver for a Group of
Users' Agent")

If Continue = 7 Then
Exit Sub
End If
'===============================================================================
========
' DECLARATIONS
'===============================================================================
========
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim Groupdoc As NotesDocument
Dim Persondoc As NotesDocument
Dim myServerName As String
Dim myGroupName As String
Dim mycounter As Integer
'===============================================================================
========
' USER INPUT 'GROUP'
'===============================================================================
========
Enter_Group:
myGroupName = Inputbox ("What is the name of the group that has the users you
would like to convert?" _
, "Input Required")
'===============================================================================
========
' INPUT VALIDATION 'GROUP'
'===============================================================================
========
If myGroupName = "" Then
Exit Sub
End If
Set db = Session.CurrentDatabase
Set view = db.getview("Groups") 'Get group view
Set Groupdoc = view.getdocumentbykey(myGroupName,True) ' Get group doc
If (Groupdoc Is Nothing) Then
Msgbox "This is not a valid group. Please try again!", 16 ,"PROBLEM:"
Goto Enter_Group
End If
'===============================================================================
========
' USER INPUT 'SERVER'
'===============================================================================
========
Enter_Server:
myServerName = Inputbox ("What is the name of the server that you would like
to set these users to?" _
& Chr(13) & "Note: the server name must be canonicle", "Input Required", _
"CN=YourCN/OU=YourOU/O=YourO")
'===============================================================================
========
' INPUT VALIDATION 'SERVER'
'===============================================================================
========
If myServerName = "" Then
Exit Sub
Else
If Not (myServerName Like "CN=*" And _
myServerName Like "*OU=*" And _
myServerName Like "*O=*") Then
Msgbox "You did not enter the Server Name in the correct format!", 16
,"PROBLEM:"
Goto Enter_Server
End If
End If
'===============================================================================
========
' USER INPUT CHECK
'===============================================================================
========
Continue = Msgbox ("You are about to change the mailserver entry to " &
Chr(13) _
& myServerName & Chr(13) _
& "for all users in the " & "'" & myGroupName & "'" & " group." & Chr(13) _
& "Do you still wish to continue?",36,"'Change Mailserver for a Group of
Users' Agent")

If Continue = 7 Then
Exit Sub
End If
'===============================================================================
========
' MAIN CODE
'===============================================================================
========
Set view = db.getview("($Users)") ' Get user view

Forall x In Groupdoc.members
Set Persondoc = view.getdocumentbykey(x,True) ' Get user doc
If Not(Persondoc Is Nothing) Then
Persondoc.mailserver = myServerName 'Set new MailServer value
Call Persondoc.save (True,True) 'Save doc
Print "Modifying Person Doc For: " & x  -----------------------
Random Solutions  
 
programming4us programming4us