Resetting the wcsadmin user account password in the Developer
environment.
Procedure
-
Stop your test environment.
-
From a command window, navigate to the
WCDE_installdir\bin directory, where
WCDE_installdir is the installation directory of your development
environment.
-
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:
-
Depending on your database, perform the following steps:
- For Derby:
- Type
ij.bat
to use a command-line utility to access your Cloudscape
database.
- At the
ij >
prompt, type connect '..\db\mall';
- 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';
- Type
exit;
to exit the ij utility.
- Restart your test environment.
- From a DB2 command window, connect to your database.
- 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';
- Type
exit
to close the DB2 command window.
- Open an SQLPlus command window by using the user name and password for your
WebSphere Commerce database.
- 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;
- Exit from the SQLPlus command window.
-
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.
-
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:
-
Execute the following SQL query on the database to obtain the salt:
select salt from userreg where logonid='wcsadmin';
-
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
-
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';