Unable to get LDAP Syntxt Correct

Started by geauga, December 14, 2015, 01:19:41 PM

Previous topic - Next topic

geauga

I am trying to use the AD extender to add a user to a group.  I am able to usethe dsFindPath function to confirm that both the group and user exist but when I try and use dsAddToGrp it fails.  I am sure that it is my syntxt. Does anybody have suggestions for a change to get it working?

Code (winbatch) Select

sUserPath = "LDAP://cc.ad.cchs.net:389/cn=Smith, Richard,OU=Users,OU=HCS,DC=cc,DC=ad,DC=cchs,DC=net"
; Group specified by common name.
sGroupPath = "LDAP://cc.ad.cchs.net:389/cn=TestWinbatch,OU=Groups,OU=HCS,DC=cc,DC=ad,DC=cchs,DC=net"

dsAddToGrp(sGroupPath, sUserPath)

dsSetCredent("", "")


td

You state that 'it fails' but you did not provide the error number or text so there isn't much to go on.  In lieu of more error information there are a few things to check.  Make sure your LDAP paths are correct, i.e., use the paths as returned by dsFindPath and use credentials that have sufficient privilege to add users to groups.  There are many more ways to get on the wrong side of AD, but assuming the LDAP paths you posted here are close to what you are actually using, most do not apply in this case.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

geauga

I think that this is a privledge thing.  All LDAP requests that I have done in the past were read only sort of requests.  Now I am trying to do write requests but the credentials that I am using might not have the privledges to add users to groups.  I will check this out.