How to reset License Manager admin user password to the default value

Version 1

    Details

     

    This article describes how to reset the password for the Admin user account to the default value of admin.

     


    Resolution

     

    To reset the password to the default value execute the following SQL script in SQL Management Studio:


    USE LicenseManager
    GO

    --***********************************************************************************
    -- Raise an error if we are not on the correct version
    --***********************************************************************************
    DECLARE @FirstVersion varchar(16)
    DECLARE @LastVersion varchar(16)
    DECLARE @DbVersion varchar(16)
    SET @FirstVersion='2.0'
    SET @LastVersion='3.4'
    SELECT @DbVersion=internalVersion FROM lmSystem

    IF @DbVersion > @LastVersion OR @DbVersion < @FirstVersion
    BEGIN
        RAISERROR ('This script will only run on versions between %s and %s. This repository version is %s'
            ,20,1,@FirstVersion,@LastVersion,@DbVersion) with log
    END
    --*************************************************************************************

    UPDATE lmUser SET userpass = pwdencrypt('admin') WHERE NAME = 'Administrator'

    --*************************************************************************************
    IF NOT EXISTS (SELECT * FROM sysobjects WHERE id = object_id('dbo.PatchList') AND xtype ='U')
    BEGIN
    CREATE TABLE PatchList
    (
    PatchDate smalldatetime,
    UpdateNumber int,
    Comments varchar(30),
    PackVersion int
    )
    END
    INSERT INTO PatchList (PatchDate,UpdateNumber,Comments,PackVersion) VALUES(GetDate(),2011,'reset admin pwd',0)

    GO

    --*************************************************************************************
    --*************************************************************************************

    USE master
    GO