locked
[ERROR] C is too long: maximum length is 2, actual length is 3. RRS feed

  • Question

  • Anyone know what the following error means in 2007 sp1?

     

    [ERROR] C is too long: maximum length is 2, actual length is 3.

     

    I get this error when I try to move a mailbox from a 2003 organization.  Here's some specifics:

    • Source mailbox is in an Exchange 2003 orgainzation in a different forest
    • Source user account is migrated from a different forest using ADMT
    • Same error occurs when trying to create a new mailbox for the target user account in the 2007 Exchange Management Console

    Code used to move the mailbox:

     

    Move-Mailbox -TargetDatabase "Exchange\EXDB" -Identity "testaccount" -GlobalCatalog "targetGC" -SourceForestGlobalCatalog "sourceGC" -NTAccountOU "OU=path,OU=to,DC=ou,DC=com" -SourceForestCredential $SourceCredential -TargetForestCredential $TargetCredential

     

    The fact that I get the same error when I try to create a mailbox for the user account in the target domain leads me to believe that there is somehting wrong with the user account.  I have migrated other user accounts and mailboxes without issue.

     

    Let me know if you need additional info.

     

    Thanks,

    John

    Monday, July 7, 2008 9:57 PM

Answers

  • Hi,

    The “c” value in ADSI corresponds to the Country/region value on the Address Tab in Active Directory Users and Computers. When it is set through ADUC, the value will always be 2 letters.


    The move mailbox is failing on that because it needs to set that attribute on the new object and is getting an invalid reference. So what we’ve got here is actually expected behavior.

    So please use ADSIedit to check the attribute on that user and correct it.

    Note: The ADSIEdit.exe tool is an MMC snap-in that you can use to edit objects in the Active Directory database.

    For more information about ADSIEdit.exe, in Help and Support Center for Windows Server 2003, click Tools, and then click Install Windows Support Tools

    Hope it helps.

    Xiu

    Wednesday, July 9, 2008 3:54 AM

All replies

  • Can you add the -Debug switch to your command line?   Or are you using the Exchange Management Console to move the mailbox?  I love the PowerShell / Exchange Managment Shell, but sometimes its errors are not very understandable.

     

     

     

    Monday, July 7, 2008 11:23 PM
  • I am using the shell to migrate the mailbox from the source domain.  I am using the console to create a new mailbox in the target domain.

     

    Unfortunately, debug mode doesn't help much except that the error occurs after the account is found in the source domain.  Here's the output from the log:

     

    [7/7/2008 8:10:01 PM] [0] Executing Command: 'Move-Mailbox -debug -TargetDatabase "Exchange\EXDB" -Identity "testaccount" -GlobalCatalog "targetGC" -SourceForestGlobalCatalog "sourceGC" -NTAccountOU "OU=path,OU=to,DC=OU,DC=com" -SourceForestCredential $SourceCredential -TargetForestCredential $TargetCredential'
    [7/7/2008 8:10:01 PM] [0] Searching objects "path to target OU" of type "ExchangeOrganizationalUnit" under the root "$null".
    [7/7/2008 8:10:09 PM] [0] Previous operation run on global catalog server 'targetGC'.
    [7/7/2008 8:10:11 PM] [0] Searching objects "Exchange\EXDB" of type "MailboxDatabase" under the root "$null".
    [7/7/2008 8:10:14 PM] [0] Previous operation run on domain controller 'targetGC'.
    [7/7/2008 8:10:17 PM] [0] Searching objects "testaccount" of type "ADUser" under the root "$null".
    [7/7/2008 8:10:19 PM] [0] Previous operation run on global catalog server 'sourceGC'.

    [7/7/2008 8:10:22 PM] [0] Processing object "sourceDomain/OU/testaccount".

    [7/7/2008 8:10:25 PM] [0] [ERROR] Unexpected Error
    [7/7/2008 8:10:25 PM] [0] [ERROR] C is too long: maximum length is 2, actual length is 3.
    [7/7/2008 8:10:40 PM] [0] Ending processing.

     

    John

    Tuesday, July 8, 2008 12:28 AM
  • Hi,

    The “c” value in ADSI corresponds to the Country/region value on the Address Tab in Active Directory Users and Computers. When it is set through ADUC, the value will always be 2 letters.


    The move mailbox is failing on that because it needs to set that attribute on the new object and is getting an invalid reference. So what we’ve got here is actually expected behavior.

    So please use ADSIedit to check the attribute on that user and correct it.

    Note: The ADSIEdit.exe tool is an MMC snap-in that you can use to edit objects in the Active Directory database.

    For more information about ADSIEdit.exe, in Help and Support Center for Windows Server 2003, click Tools, and then click Install Windows Support Tools

    Hope it helps.

    Xiu

    Wednesday, July 9, 2008 3:54 AM
  • You were correct.  The "c" value had 3 characters in the user account. 

     

    To correct this, I created a script to run through all of our user accounts, and overwrite them with the correct value.

     

    Thanks for the insight and help.

     

    John

    Wednesday, July 9, 2008 9:29 PM
  • I understand that modifying the C is a workaround and it works for me.  Is there a way to modify Exchange to able to create mailbox even the C is 3 characters?

    Wednesday, September 2, 2009 6:53 PM
  • John,

    Can you provide the script you used to correct this issue? Thanks In Advance...

    Tuesday, February 24, 2015 8:45 PM