Follow

How Can Reset root User's Password?

If root user's phone number and email address exist and SMTP settings were configured correctly, then "forgotten your password?" link can be utilized for a reset.

So, first click on the "forgotten your password?" link 

Enter root and configured phone number, should they match a generated temporary password reset link will be sent to the registered email address.

If, on the other hand, you don't have phone number configured for the account, then you can reset the password only executing TSQL commands by connecting to the database.

Connect to the MSSQL database and execute the SQL below with the password of your choosing, default is PaSSword.

 
Declare @UserName NVarChar(30) 
Declare @Password NVarChar(30) 
Declare @Application NVarChar(255) 
Declare @PasswordSalt NVarChar(128) 
Declare @DateTime datetime 

set @UserName = 'root' 
set @Password = 'PaSSword' 
set @Application = '/' 
set @PasswordSalt = (SELECT PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users u, aspnet_Applications a WHERE u.UserName=@UserName and a.ApplicationName = @Application AND u.ApplicationId = a.ApplicationId)) 
set @DateTime = getdate() 

Exec dbo.aspnet_Membership_SetPassword @Application, @UserName, @Password, @PasswordSalt, @DateTime 

BEWARE After executing the above statement, the root's password will be kept in cleartext in the database. This is highly unwanted! So follow the actions in order,

1. Login to the portal with the password you have just given for root user. Don't log out.
2. Execute sql below
3. Then, change the root password again from the portal not through the Profile->Change Your Password interface by giving the old password, but through the Admin->Users->Edit->Save Changes.

Declare @UserName NVarChar(30) 
Declare @Application NVarChar(255) 
Declare @UserId uniqueidentifier 

set @UserName = 'root' 
set @Application = '/' 
set @UserId = (SELECT UserID FROM aspnet_Users u, aspnet_Applications a WHERE u.UserName=@UserName and a.ApplicationName = @Application AND u.ApplicationId = a.ApplicationId) 

UPDATE dbo.aspnet_Membership SET PasswordFormat = 1 WHERE UserID = @UserId 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk