Adding or Changing Users via DBInit

To add or change users via DBInit:
  1. Create a file with the definitions for the users, for example user.xml:
    <?xml version="1.0"?>
    <enfinity
      xmlns =
      "http://www.intershop.com/xml/ns/enfinity/6.3.1/core/impex"
      xmlns:xsi =
      "http://www.w3.org/2001/XMLSchema-instance"
      xmlns:dt  =
      "http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt"
      xsi:schemaLocation =
      "http://www.intershop.com/xml/ns/enfinity/6.3.1/core/impex user.xsd
      http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt dt.xsd"
      major="6" minor="1" family="enfinity" branch="enterprise" build=""
    >
    
        <user business-partner-no="User1_operations">
            <business-partner-no>User1_operations</business-partner-no>
            <profile>
                <credentials>
                    <login>user1</login>
                    <password>!InterShop00!</password>
                    <enabled>1</enabled>
                </credentials>
                <description>Administrator operations site.</description>
                <first-name>user1</first-name>
                <last-name>Operations site</last-name>
    			<email>user1@test.intershop.de</email>
                <birthday-date>1973-04-19</birthday-date>
                <addresses>
                    <address name="Default Address">
                        <address-name>Default Address</address-name>
                        <first-name>not set</first-name>
                        <last-name>not set</last-name>
                        <city>not set</city>
                        <postal-code>not set</postal-code>
                        <street>not set</street>
                        <email>user1@test.intershop.de</email>
                        <default-address>1</default-address>
                    </address>
                </addresses>
            </profile>
            <user-groups>
                <user-group id="SystemAdministrators"/>
                <user-group id="SiteAdministrators"/>
                <user-group id="UnitAdministrators"/>
    			<user-group id="SLD_AR_10_SMCADMINISTRATOR"/>
            </user-groups>
        </user>
    </enfinity>
  2. Place this file to this location in your file system: [IS_HOME]/share/sites/SLDSystem/units/Operations/impex/src/user.xml.
  3. Adapt the file [IS_HOME]/share/sites/SLDSystem/units/Operations/impex/config/DBInit-UserImport.properties:
    DictionaryString.sourcefile=Users.xml 
    DictionaryString.DefaultImportMode=UPDATE
  4. Assign the new SMC admins to the user groups SLD_AR_10_SMCADMINISTRATOR and SLD_AR_10_ADMINISTRATOR in user.xml.
  5. Stop the application server.
  6. Add the following preparer to either an own cartridge or to the cartridge init_smc:
     dbinit.properties:        
    	ClassXX = com.intershop.beehive.core.dbinit.preparer.impex.ImportPreparer \
          			  unit=Operations \
                      UserImport-DBInit \
                      DBInit-UserImport.properties
  7. Execute dbinit for only this preparer: dbinit.sh --exec-id=init_smc:ClassXX