XADM: How to Modify a User's E-mail Addresses by Using Ldifde (313823)



The information in this article applies to:

  • Microsoft Exchange 2000 Server, when used with:
    • the operating system: Microsoft Windows 2000

This article was previously published under Q313823

SUMMARY

This article describes how to change the proxy addresses of objects in Active Directory.

MORE INFORMATION

The valid LDAP Data Interchange Format (LDIF) change types are:
  • add (creates a new object)
  • delete (deletes an entire object; do not use to remove just an attribute)
  • modrdn (renames the object, but does not change its container path)
  • modify (alters an attribute of an object)
Always leave a blank line at the bottom of every LDIF import file.

To change these addresses:
  1. Export an Ldifde file of the system objects with proxyaddresses attributes that need to be changed. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    237677 Using LDIFDE to Import and Export Directory Objects to Active Directory

    To export an Ldifde file of the system objects with proxyaddresses attributes that need to be changed:
    1. Open a Command Prompt window, and then type LDIFDE to display a list of options and commands.
    2. Run an Ldifde export with a command line that is similar to:

      ldifde -f C:\export.ldf -v

      NOTE: By default, this command extracts all of the information from the Active Directory domain that the user is logged on to.
  2. Copy the proxyaddresses attribute information of the object that you want to change to an empty Microsoft Notepad file, for example:

    proxyAddresses: CCMAIL:Connelly, Peter at SITE
    proxyAddresses: NOTES:Peter Connelly/SITE/Organization@Exchange
    proxyAddresses: GWISE:Exchange.SITE.peterco
    proxyAddresses: SMTP:peterco@domain.com
    proxyAddresses: X400:c=US;a= ;p=Organization;o=SITE;s=Connelly;g=Peter;
    proxyAddresses: MS:ORGANIZATI/SITE/PETERCO

  3. Copy the distinguished name information for this object, for example:

    dn: CN=Peter Connelly,CN=Users,DC=domain,DC=com

  4. Add this distinguished name information to the Notepad file and format the information as such, for example:

    dn: CN=Peter Connelly,CN=Users,DC=domain,DC=com
    changetype: modify
    replace: proxyAddresses
    proxyAddresses: CCMAIL:Connelly, Peter at SITE
    proxyAddresses: NOTES:Peter Connelly/SITE/Organization@Exchange
    proxyAddresses: GWISE:Exchange.SITE.peterco
    proxyAddresses: SMTP:peterco@domain.com
    proxyAddresses: X400:c=US;a= ;p=Organization;o=SITE;s=Connelly;g=Peter;
    proxyAddresses: MS:ORGANIZATI/SITE/PETERCO
    -

    NOTE: Even if you want to change only one proxy address, you must keep the other addresses listed, or they will be removed. This configuration is set to modify as a replacement of the proxyaddresses attribute.

    The hyphen at the end of the file is necessary, so that Ldifde knows when the import operation is complete and does not need to continue. Without this hyphen, you may receive an error message that is similar to:

    Connecting to "DCservername.domain.com"
    Logging in as current user using SSPI
    Importing directory from file "IMPORT.LDF"
    Loading entries.
    There is a syntax error in the input file
    Failed on token starting with 'M' on line 0
    0 entries modified successfully.
    An error has occurred in the program

    The following example is a proxy address change that uses the same sample information as the preceding steps. The Import.ldf file contains the following information:

    dn: CN=Peter Connelly,CN=Users,DC=domain,DC=com
    changetype: modify
    replace: proxyAddresses
    proxyAddresses: CCMAIL:Connelly, Peter at SITE
    proxyAddresses: NOTES:Peter Connelly/SITE/Organization@Exchange
    proxyAddresses: GWISE:Exchange.SITE.peterco
    proxyAddresses: SMTP:peter.connelly@domain.com
    proxyAddresses: X400:c=US;a= ;p=Organization;o=SITE;s=Connelly;g=Peter;
    proxyAddresses: MS:ORGANIZATI/SITE/PETERCO

    -

    The only item that is changed is the SMTP address; however, all of the other proxy addresses must be listed.
  5. Run the following command to import the Import.ldf file:

    ldifde -i -f c:\import.ldf

After you use these steps, a message is displayed that states that one entry was modified successfully and the command completed successfully.

Modification Type:MinorLast Reviewed:4/21/2005
Keywords:kbhowto KB313823