Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with Novell ActiveX Controls to set LDAP attributes (2)

1 view
Skip to first unread message

Coen

unread,
Mar 4, 2003, 7:56:50 PM3/4/03
to
Hi,

We have a serious problem to set the LDAP attribute 'userPassword' in
eDirectory within an ASP file running IIS. The problem is related to
the NWIDirEntriesLib component. If we run the ASP file, then we got
this error message: "insufficient access".

BTW: there is always a connection to LDAP server using an admin
account, so that can not be the problem.

How can we handle this attribute 'userPassword'?


The vbscript code in ASP:

function setUserPasswordViaLDAP(i_strCN, i_strOldPassword,
i_strNewPassword)

'on error resume next

' instantiate component
dim objDirEntries
set objDirEntries =
Server.CreateObject("NWIDirEntriesLib.NWIDirEntries.1.1")

' connect to LDAP
objDirEntries.PortNumber = LP_LDAP_SERVER_PORT
objDirEntries.FullName = LP_LDAP_SERVER & "/" &
LP_LDAP_SERVER_O_CORP

objDirEntries.UserName = LP_LDAP_SERVER & "/" &
LP_LDAP_SERVER_O_CORP & "/" & LP_LDAP_SERVER_OU_USERS &
LP_LDAP_ADMIN_CN

objDirEntries.Password = getDecodedAdminPasswordFromRegistry()
objDirEntries.Connect

' ...till here ok, with admin rights...

' set organizational unit
objDirEntries.FullName = LP_LDAP_SERVER & "/" &
LP_LDAP_SERVER_O_CORP & "/" & LP_LDAP_SERVER_OU_USERS

dim strUser
strUser = "cn=" & i_strCN

' get organizational unit for user
dim objEntry
set objEntry = objDirEntries.Entries.Item(strUser) ' voorbeeld:
"CN=user1"

dim phNos
dim phArray(0)
phArray(0) = i_strNewPassword
phNos = phArray

call objEntry.SetFieldValue("userPassword", phNos)
objEntry.Update

' We use the admin account, but objEntry.Update causes "insufficient
access" error ?!?!

if Err.Number = 0 then
setUserPasswordViaLDAP = ""
else
setUserPasswordViaLDAP = cstr(Err.number)
end if

end function


How can we handle this attribute 'userPassword'? We have alreay tried
function setPassword, but that function doesn't work too. Function
setPassword() obsolete?


Regards,
Coen Mooijman

Marcel Cox

unread,
Mar 5, 2003, 2:26:09 AM3/5/03
to
You are probably more likely to get a reply if you post to one of
Novell's official news server. The developer server is at
http://developer-forums.novell.com and the Technical support server
can be found at http://support.novell.com/forums

Marcel

cmoo...@aepex.com (Coen) wrote in message news:<e9ffb5a1.03030...@posting.google.com>...

0 new messages