Copied to clipboard

Flag this post as spam?

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


  • karen 186 posts 461 karma points
    Aug 18, 2017 @ 18:22
    karen
    0

    Umbraco 7.6.5 reset admin password in database - not working

    a few days ago I set up an Umbraco 7.6.5 VS studio project with nuget on my localhost. Ran it, set up the database etc, but that is as far as I got. Since there are different/longer password requirements in 7 than in 6 (which after I found I can change in web.config), I put in a diffrent password than I usually do for development. Today I forgot the password, so couldn't log in.

    Having done this a ton before (on older versions of Umbraco) I just went to the database table umbracoUser and pasted in the hashed password from another instance. Basically did what is described in this article: http://jondjones.com/learn-umbraco-cms/umbraco-developers-guide/umbraco-troubleshooting/reset-your-umbraco-7-password-manually-via-the-database.

    BUT, it is not working as it always has in the past. I even tried a few of the different hashes from that article. Still no go. I cannot do the 'forgot password' link because I don't have any mail server set up on my localhost (and not allowed to install one) so just get an error when trying that.

    Since I just set the project up, I can easily just delete the whole database and start fresh. BUT, wondering if something has changed and why this hack is no longer working to fix our forgotten password (or sometimes never given in the case of inherited from someone who quit the company)?

  • David Armitage 505 posts 2073 karma points
    Aug 22, 2017 @ 01:46
    David Armitage
    0

    Hi Karen,

    I am guessing this might work but not 100%.

    I know you can change the password to plain text from hashed within the web.config. You might need to give this a quick google but here is the section in the web.config that needs updating.

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <clear />
            <add name="UmbracoMembershipProvider" type="Umbraco.Web.Security.Providers.MembersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="5" useLegacyEncoding="false" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Clear" allowManuallyChangingPassword="false" />
            <add name="UsersMembershipProvider" type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="5" useLegacyEncoding="false" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" allowManuallyChangingPassword="false" />
          </providers>
        </membership>
    

    Once this is updated re-load the project and then do in the database and set a plain text password.

    See if this then lets you in. Hopefully it should work for you.

    Kind Regards

    David

  • karen 186 posts 461 karma points
    Sep 15, 2017 @ 16:12
    karen
    0

    Not sure this will work, because I will need to set it back to encrypted.

  • karen 186 posts 461 karma points
    Sep 15, 2017 @ 16:22
    karen
    0

    Well I just did this again and it worked just fine. Not sure why it did not work awhile ago!

  • David Armitage 505 posts 2073 karma points
    Sep 18, 2017 @ 07:31
    David Armitage
    0

    Hi Karen,

    Glad I could be of some assistance. Feel free to make this post as complete and save other people getting involved with an answer.

    Kind Regards

    David

  • Craig Mayers 164 posts 508 karma points
    Sep 18, 2017 @ 08:16
    Craig Mayers
    0

    FYI: There is also a really cool package that does this for you also:

    https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/

    Used it several times now and it works perfectly!

  • karen 186 posts 461 karma points
    Sep 18, 2017 @ 21:39
    karen
    0

    David - while I appreciated you trying to help, actually I meant I redid the steps I stated in my initial question and that worked. (copy/pasting the password between databases) thanks

  • David Armitage 505 posts 2073 karma points
    Sep 19, 2017 @ 08:54
    David Armitage
    0

    Arrr got you now.

    Glad you got it fixed anyway.

    Kind Regards

    David

  • Bex 444 posts 555 karma points
    Sep 21, 2017 @ 09:04
    Bex
    3

    I thought I'd add this ..

    Although it will not help anyone having problems with the actual password, it will probably help if you need to use the "forgotten password" link but have no mail server.

    Remember you can always set a local drop folder for your email's in the webconfig:

      <mailSettings>
          <smtp deliveryMethod="SpecifiedPickupDirectory">
          <specifiedPickupDirectory pickupDirectoryLocation="c:\temp\maildrop\"/>
        </smtp>
        </mailSettings>
    

    Then you don't need a mail server and you can still get the emails :)

Please Sign in or register to post replies

Write your reply to:

Draft