Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hussein Khraibani 15 posts 98 karma points
    Sep 06, 2017 @ 22:15
    Hussein Khraibani
    0

    Reset admin password on 7.6

    Is there a way reset the admin password, in version 7.6.1 I have tried all the method that been described in previous article non of them worked.

    http://www.codeshare.co.uk/blog/how-to-reset-the-umbraco-admin-account-password/

    https://our.umbraco.org/forum/using/ui-questions/49134-Forget-My-Password-For-Umbraco-Admin-Site

    I even tried a fresh install and used the values from "userPassword" & "securityStampToken" into the locked user.

    Any reason why reset password doesn't work?

  • Aswatghi ES 2 posts 73 karma points
    Nov 12, 2020 @ 08:21
    Aswatghi ES
    0

    Yes, you can use the below code snippet for resetting the admin password

    var user = ApplicationContext.Services.UserService.GetUserById(userId);
    if (user != null)
       {
        user.Username = userName;
        user.IsApproved = true;
        user.IsLockedOut = false;                   
        ApplicationContext.Services.UserService.Save(user);                
       //Change password
       ApplicationContext.Services.UserService.SavePassword(user,userPassword);
       }
    
  • Erik Eelman 82 posts 322 karma points
    May 17, 2021 @ 12:29
    Erik Eelman
    100

    Hi Hussein,

    Did you check if user isn't locked out? The userNoConsole field in the database should have value 0. If it has value 1 the user is locked out.

    Note: If you change this value from 1 to 0 you need to restart your webapp.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies