Secure > Quick reference to user IDs, passwords, and Web addresses
Reset accounts
If a WebSphere Commerce account gets locked or disabled for some reason, an administrator can unlock or enable the account.
There are different scenarios where an administrator can unlock or enable an account that has been locked or disabled:
- Reset a Site Administrator's account
- Reset other user accounts, if the account is not a Site Administrator's account
- Reset the wcsadmin user's password
- Reset the wcsadmin user's password on runtime (calling wcs_password)
Procedure
- Reset a Site Administrator's account:
- Connect to the WebSphere Commerce database.
- Run the following SQL statements:
UPDATE USERREG SET STATUS=1, PASSWORDRETRIES=0 WHERE LOGONID='logonId'; commit;
where logonId is the user ID of the account that to reset (for example, wcsadmin).
To enter SQL statements, you can use either the DB2/400 Query Manager and the SQL development kit, or you can use System i Navigator.
To use System i Navigator to perform database queries:
- Start the System i Navigator.
It must be started from the machine that runs the Windows operating system.
- Expand the system, then expand Databases and right-click Relational Database. Select Run SQL Scripts.
- From the Connection menu, select JDBC Setup, then click the Server tab.
- Erase any existing values from the Default libraries field, then enter the name of the database schema for the instance and click OK to save the changes.
By default the database schema name is the name of the instance.
- Type the SQL statement in the database window.
- Disconnect from the database.
- Reset other user accounts, if the account is not a Site Administrator's account:
- Open the Organization Administration Console.
- Click Access Management > Users.
- Double-click the user account or select the user account from the list and click Change.
- Enabled in the Account status field.
- Click OK.
- Reset the wcsadmin user's password:
By default the administrator logon id and password are wcsadmin. You can reset the password for the wcsadmin user if the following statements are true:
- You are using a new instance, not a migrated instance.
- You did not change the merchant key from its default value.
After the wcsadmin user's password has been reset, it will become expired and must be changed the next time the wcsadmin user logs on.
- Stop the test environment.
- From a Windows command window, navigate to the WCDE_INSTALL\bin directory, where WCDE_INSTALL is the installation directory of the development environment.
- Type ij.bat to use a command line utility to access the Apache Derby 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 the 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.
To reset the wcsadmin user's password to wcsadmin:
- Open an SQLPlus command window using the user name and password for the WebSphere Commerce 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';
commit;
- Exit from the SQLPlus command window.
- Reset the wcsadmin user's password on runtime (calling wcs_password):
By default the administrator logon id and password are wcsadmin. You can change the statements below to reflect the administrator logon id if you have changed it from the default logon id.
- Enter the following SQL statement:
select salt from userreg where logonid='wcsadmin';
- Run the following command line script from the WC_INSTALL/bin directory:
$ wcs_password
<password>
<salt>
<merchant key>;
For example:
$ wcs_password password hsdbacehyoyn 0123456789abcdef
- Enter the following SQL statement:
update userreg set logonpassword=<hex encrypted version of password output from the wcs_password script> where logonid = 'wcsadmin';
For example:
update userreg set logonpassword=x'74434f61354f51593862415655304d5268424e54723865685653356151374a2b353163506c4261363730633d202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020' where logonid = 'wcsadmin';
Related concepts
Quick reference to user IDs, passwords, and Web addresses