WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Problem doing CreateMailbox on Exchange 5


Question:

I am using your sample code from the adsi extender help file to create a mailbox and assign security to that mailbox. My code is character for character identical to the sample and it generates error 1026. I have looked at your tech support artice W15033

I can create the mailbox but cannot setup the trustees. The exchange server is NT4 and the desktop client running the script is Windows XP.

The error I get is a 1026: the security id structure is invalid. This is produced on the last line.

dssetproperty(mailbox,"NT-Security-Descriptor",sd)
running on windows xp sp1 with adssecurity.dll registered

Can you help?

Answer:

The 1026 errors means a system error.

Generally , security descriptor problems with the mailbox script result form using the wrong format for the "Trustee" property. Make sure you are using the latest version of the extender, as well.

User Reply:

It seems that the SID has to be used as the trustee property as well as the owner and group properties.

Since I have your time could you tell me how to modify the script to add an additional trustee?

Answer:

You can get this error for many reasons. The most common causes are (as you suggest) from using the wrong trustee value or from attempting to update a NT4 security descriptor from a Win2k/XP machine. For now we will assume you are doing the former and not the latter.

You can use the SID obtained by the call:

Sid = dsGetProperty(sUserPath, "objectSid")
to set the trustee property. You will need to change the value in the sUserPath to that of an administrator account to get the SID for the other two security properties.

I have seen cases were changing to SID for the trustee have fixed the problem. So good luck.


Article ID:   W16320
File Created: 2005:02:18:12:19:48
Last Updated: 2005:02:18:12:19:48