How to reset forgot password of Nopcommerce admin?

There might be a scenario where you have lost or forgotten the Nopcommerce admin password due to any reasons. But don't need to worry because, in this tutorial, we will guide you on how you can reset your forgotten password of Nopcommerce admin. Here, we have mentioned two options, how can you regain your access to Nopcommerce admin. You must have MSSQL database user credentials to handle these steps. 

IMP Note: This article will help you to reset the admin password of NopCommerce 4.1. If you have another version, there might be slight changes in steps.

Option 1: How to Change the Password of Existing Administrator Account?

  1. Log into your SQL Server Management Studio with the NopCommerce DB user credentials.

  2. Click on the New Query and execute the below query inside the window. Ensure that you replace the admin_user_email_address with your actual email address.

    SELECT Id FROM dbo.Customer
    WHERE Username = 'admin_user_email_address'

  3.  The above query will give you the user ID of the admin email address. You need to remember this ID to run the future query.

  4. Again click on the New Query and execute the below T-SQL statement. Ensure that you replace the yournewpassword with the new password you want to reset and change the ID with the ID we have received from the above query.

    UPDATE dbo.CustomerPassword
    SET PasswordSalt = '', PasswordFormatId = 0, Password = 'yournewpassword'
    WHERE CustomerId = Id
  5. You have successfully changed the password of your Nopcommerce admin. Go to (Login >> Customers >> Customers >> Edit >> Change Password) and instantly change your password that we have just reset. 

  6. Return to the SQL Management Studio and execute the below command. Replace the ID with the CustomerID as we have received in the first query. This command will delete the plain text password. It will help against account compromised issues. 

    DELETE FROM dbo.CustomerPassword
    WHERE CustomerId = Id AND PasswordFormatId = 0

Option 2: How to Create a New User and Grand Administrative Privileges to it?

  1. Register a New User. To do this, go to the customer registration page and create a new account. 

  2. Access your database using SQL Management Studio. 

  3. Click on the New Query and execute the below T-SQL command. Replace the email_user with your new email account that you have registered in step 1.

    SELECT Id FROM dbo.Customer
    WHERE Username = 'email_user'
  4. The above query will give you the ID of the newly registered user. Run the below query using the ID that we have received. 

    INSERT INTO dbo.Customer_CustomerRole_Mapping (Customer_Id, CustomerRole_Id)
    VALUES (Id, 1)
  5. Login to your Nopcommerce using the newly registered account, and you will find that it has administrative privileges. Using this account, you can change the password of your Nopcommerce Admin, which password you lost. Now, you can remove the newly created user, or you can keep using it.

Related Articles

How to resolve “mcrypt extension is missing. Please check your PHP configuration” error in phpMyAdmin?

This article will guide you on how to resolve the “mcrypt extension is missing. Please check your...

How to install PHP 7 on windows server Manually?

It is required to install the PHP on your windows web server to run the PHP Website. Before we...

Do You Have A SmarterMail Demo Account?

SmarterMail provides flexible email server for individuals, small businesses, and...

Do You Offer VPS with 8 vCPU Cores?

No, we do not provide VPS with 8 vCPU cores. We provide VPS with maximum 4 vCPU cores. This is...

How to reboot my Windows VPS from VPS Management Portal?

You can reboot your VPS from your VPS Management Portal ( by following...

  • 0 Users Found This Useful

Was this answer helpful?