Friday, April 23, 2010

Reset BES 5 BAS admin password

Use the following SQL script to add a user called admin to your Blackberry Enterprise Server (works with Express, too) version 5.x.  Password is blackberry.
/*+---------------------------------------------------------------------------
* Support Script: BASAuthentication.sql
* Created: 07/09/2009
* Tracked via :
* Description: The script performs a stored procedure to create or edit
* the BAS administrator user account. (admin)
*
* Instructions for running script:
* 1. Backup database
* 2. Edit items under the editing section. (By default none required)
* 3. Run the script on the BES configuration database
*+--------------------------------------------------------------------------*/

DECLARE
@DisplayName VARCHAR(256),
@Authentication VARCHAR(256),
@AuthenticatorTypeId INT,
@AuthenticatorInstanceId INT,
@ExternalAuthenticatorId VARCHAR(255),
@EncryptedPassword VARCHAR(256)

/************************************************************
Start of editing required section
*************************************************************/

SET @DisplayName = 'System Administrator' -- Display name (Not always used)
SET @Authentication = 'BAS' -- 'BAS' for BAS authentication
SET @EncryptedPassword = '2951a982f568f15567b7c6e0e50990b9' -- Encrypted string of password 'blackberry'


/************************************************************
End of editing required section
*************************************************************/

IF @Authentication LIKE 'BAS'
BEGIN
SET @AuthenticatorTypeId = 0 -- Set to 0 for BAS
SET @AuthenticatorInstanceId = 0 -- Set to 0 for BAS
SET @ExternalAuthenticatorId = NULL

EXEC SetUpBASorADAuthentication @DisplayName, @AuthenticatorTypeId, @AuthenticatorInstanceId, @ExternalAuthenticatorId, @EncryptedPassword

END
GO

No comments:

Post a Comment