Copied to clipboard

Flag this post as spam?

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


  • Bijesh Tank 192 posts 420 karma points
    Aug 09, 2013 @ 16:03
    Bijesh Tank
    0

    Recreate the admin user

    Hi,

    A bit of an odd one here... We recently got supplied an Umbraco databse to restore but it did not contain any users in the users table, including the main "admin" user. As you can understand, this casuses some difficulties.

    We tried to add the admin user back in the users table but this doesn't work. Is there a manual way of recreating the admin user? Does someone have a script handy or any pointers that may help?

    Thanks!

    Bij

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Aug 09, 2013 @ 16:06
    Ravi Motha
    1

    There is a post about resetting the admin user, I think this will be a stage of your process.. http://our.umbraco.org/forum/using/ui-questions/4790-ouch-forgot-admin-password-how-to-reset?p=1

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 09, 2013 @ 17:11
    Ismail Mayat
    0

    Take a copy of the admin row from source and insert into target should all work

  • Bijesh Tank 192 posts 420 karma points
    Aug 09, 2013 @ 17:46
    Bijesh Tank
    0

    When you say source, do you mean the database source? Unfortunately we don't have access to that :( Nor will we get access it...sucks!

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 09, 2013 @ 17:49
    Ismail Mayat
    0

    Yes source db however if you have access to a dB with existing amin and you know password use that as source and insert that ensure in target is is 0 as admin is always 0

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Aug 09, 2013 @ 17:55
    Ravi Motha
    0

    if he does that won't the hashes be different and therefore he'd have the user but not the password, and then he could use the steps described in the link i posted earlier..

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 09, 2013 @ 19:01
    Ismail Mayat
    0

    Ravi,

    ATM in target he has no users so from a know db get admin User record with hashed password main thing is you k ow the password insert that Record it will work I have done it in the past

  • Poornima Nayar 106 posts 276 karma points MVP 6x c-trib
    Aug 12, 2013 @ 10:45
    Poornima Nayar
    0

    Hi,

    I tried copying a row from a known umbraco database and inserting the user to this database but it does not insert a row into the table with id 0

    Poornima

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 12, 2013 @ 11:20
    Ismail Mayat
    0

    Poornima,

    If you already have existing admin user then just update the hashed password.

    I have done this on a number of occasions btw i did it using sql server mamangment tool opened the cmsusers table in edit mode

    Regards

    Ismail

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Aug 12, 2013 @ 11:21
    Niels Hartvig
    0

    If you can't get access to the database, then you'll be out of luck. As easy as that. If there's no root user (id 0) then somebody has been messing directly with the db + constraints and the whole db is corrupt. Hard to solve without db access.

Please Sign in or register to post replies

Write your reply to:

Draft