WebSphere Commerce Developer

Resetting the wcsadmin user password (Developer)

Resetting the wcsadmin user account password in the Developer environment.

Procedure

  1. Stop your test environment.
  2. From a command window, navigate to the WCDE_installdir\bin directory, where WCDE_installdir is the installation directory of your development environment.
  3. If you are using a new instance instead of a migrated instance, and you do not change the default merchant key or the merchant key location, perform the following steps:
    1. Depending on your database, perform the following steps:
      • Apache DerbyFor Derby:
        1. Type ij.bat to use a command-line utility to access your Cloudscape database.
        2. At the ij > prompt, type connect '..\db\mall';
        3. Enter the following SQL statements in order:
          
          update userreg set logonpassword = x'74434f61354f51593862415655304d5268424e54723865685653356151374a2b353163506c4261363730633d202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020' where logonid='wcsadmin'; 
          
          update userreg set salt = 'hsdbacehyoyn' where logonid='wcsadmin'; 
          
          update userreg set status = 1 where logonid='wcsadmin'; 
          
          update userreg set passwordexpired = 0 where logonid='wcsadmin'; 
          
        4. Type exit; to exit the ij utility.
        5. Restart your test environment.
      • DB2From a DB2 command window, connect to your database.
        1. Enter the following SQL statements in order:
          
          update userreg set logonpassword = x'74434f61354f51593862415655304d5268424e54723865685653356151374a2b353163506c4261363730633d202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020' where logonid='wcsadmin'; 
          
          update userreg set salt = 'hsdbacehyoyn' where logonid='wcsadmin'; 
          
          update userreg set status = 1 where logonid='wcsadmin'; 
          
          update userreg set passwordexpired = 0 where logonid='wcsadmin'; 
          
        2. Type exit to close the DB2 command window.
      • OracleOpen an SQLPlus command window by using the user name and password for your WebSphere Commerce database.
        1. Enter the following SQL statements in order:
          
          update userreg set logonpassword = '74434f61354f51593862415655304d5268424e54723865685653356151374a2b353163506c4261363730633d202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020' where logonid='wcsadmin'; 
          
          update userreg set salt = 'hsdbacehyoyn' where logonid='wcsadmin'; 
          
          update userreg set status = 1 where logonid='wcsadmin'; 
          
          update userreg set passwordexpired = 0 where logonid='wcsadmin';
          
          commit;
          
        2. Exit from the SQLPlus command window.
    2. Log in using the reset wcsadmin user. The password for the wcsadmin user is reset to wcsadmin. When you log in, change the password for the wcsadmin user.
  4. If you are using a migrated instance, or you change the default merchant key or the merchant key location, such as using AES-128 encryption, perform the following steps:
    1. Execute the following SQL query on the database to obtain the salt:
      select salt from userreg where logonid='wcsadmin';
    2. To get the encrypted password, run the wcs_password command from the WCDE_installdir\bin directory in one of the following ways:
      • Get the encrypted password using the encrypted merchant key. The merchant key can be in the wc-server.xml or the merchant key file that you specify:
        $ wcs_password <password> <salt> <encrypted_merchant_key>
        For example,
        $ wcs_password <password> <salt> WIEM28/7874N4234FR55450EWE89
      • Get the encrypted password by specifying the directory of the merchant key configuration file that includes your custom merchant key file. The file directory is specified in the KeysConfigFile parameter of the wc-server.xml file:
        $ wcs_password <password> <salt> -k <merchantkey_configuration_file_directory>
        For example,
        $ wcs_password <password> <salt> -k ..\workspace\WC\xml\config\WCKeys_AES.xml
      The encrypted password is returned. For example:
      === Encrypted Password ===
      
      ASCII Format: oZQQ+pRyTxhbv/Y26yT0eNJ1KaDMLSWerxHABQAovp5HDAlIHE8VPJFJL7w6MYejW4/Bw9T2cctNp3miFGEWhw==
      Hex Format: 6F5A51512B70527954786862762F593236795430654E4A314B61444D4C535765727848414251416F7670354844416C4948453856
    3. Run the following SQL statement to reset the password. Input the encrypted password in the hexadecimal format that is returned in step 4.b:
      update userreg set logonpassword=<hex_format_of_encrypted_password> where logonid = 'wcsadmin';
      For example:
      update userreg 
      		set logonpassword=x'6F5A51512B70527954786862762F593236795430654E4A314B61444D4C535765727848414251416F7670354844416C4948453856' 
      		where logonid = 'wcsadmin';