Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Deleted Admin User


MartynH

Question

My HC2 has been playing up recently and I've been on the phone to support to try to fix it, but they have only made it worse. 

 

At one point the person I was talking to, via TeamView, had ssh'd in to my HC2 and executed 'delete from New_Device where Id =2' in the DB which I think has deleted my admin user and now I can't get the main page to load, let alone restore a backup or repair the image.

 

Can anyone send me what is printed when you execute 'SELECT from New_Device where Id = 2' on the fibaro HC2 db?

 

Thanks

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Hi @MartynH,

 

Why don't you go into manual recovery and restore a back-up?

Please login or register to see this link.

 

Please login or register to see this spoiler.

 

 

 

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 9 hours ago, Flash said:

    Hi @MartynH,

     

    Why don't you go into manual recovery and restore a back-up?

    Please login or register to see this link.

     

    Please login or register to see this spoiler.

    When i try to repair or recover (in fact any of the three options from the recovery menu) I get an error saying something about a corrupt image.  I've no idea how to fix at this point (and it seemed that Fibaro didn't know either).  They suggested I replace the battery on the motherboard which I'll try but I can't see how deleting the admin user will do anything good

    Link to comment
    Share on other sites

    • 0

    If a support member of Fibaro deleted your admin user, I think you should contact Fibaro how they think the issue can be solved. 

    Link to comment
    Share on other sites

    • 0
    1 hour ago, MartynH said:

    When i try to repair or recover (in fact any of the three options from the recovery menu) I get an error saying something about a corrupt image.

     

    I saw a posting from @akatar.. Maybe you can ask him if he knows where to download a HC2 image to restore.

    1 hour ago, MartynH said:

    They suggested I replace the battery on the motherboard which I'll try but I can't see how deleting the admin user will do anything good

    Maybe the battery can be a cause for corrupting the image.

     

     

    1 hour ago, SmartHomeEddy said:

    If a support member of Fibaro deleted your admin user, I think you should contact Fibaro how they think the issue can be solved.

    I agree that @SmartHomeEddy. Is right. I don't know in what time frame support can/could assist. But you can always send a ticket and ask them for support.

    Edited by Flash
    Link to comment
    Share on other sites

    • 0
    13 minutes ago, Flash said:

    I saw a posting from @akatar.. Maybe you can ask him if he knows where to download a HC2 image to restore.


    @Martinh I experimented some with the url. This one gives an answer. Is that the version you are looking for?

     

    Please login or register to see this link.

     

     

     

    Edited by SmartHomeEddy
    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I actually have shell access to the HC2, so pretty much have free reign to do anything I like to it.  I can upload images to it but am currently on 4.6 - I'll try flashing back to 4.54 and see if that works

    Link to comment
    Share on other sites

    • 0
    2 hours ago, MartynH said:

    I actually have shell access to the HC2, 

     

    /opt/fibaro/scripts/update.sh (watch the params, it will not harm without them)

     

    3 hours ago, SmartHomeEddy said:

    Please login or register to see this link.

     

    no, these are migration images (4.180 to 4.5xx) and not recovery images. Migration images are not available for any version.

     

    Recovery image for HC2 can be found here 

    Please login or register to see this link.

    Edited by tinman
    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 18 minutes ago, tinman said:

     

    /opt/fibaro/scripts/update.sh (watch the params, it will not harm without them)

     

    no, these are migration images (4.180 to 4.5xx) and not recovery images.

    I've run the update scripts (with multiple params "--auto stable", "--auto beta", "--download 4.510 --install") and all look like they have worked, but they don't reset the DB.  What I really need is just a copy of the db from a fresh HC2 on 4.6 and I can reinstate the necessary user table as needed whilst keeping my HC2 specific data intact. 

     

    @tinman are you able to provide me either the result of the "SELECT * from New_Device where ID=2" query or a fresh db?

    Link to comment
    Share on other sites

    • 0

    "2","0","0","2","16","admin","0","HC_user","1","1","0"

     

    that admin can be in your case as well email adress, check "SELECT * from NEW_Property where Device_id = 2"

     

    Edit: not sure is New_Device is still being in use, anyway, let's try if that makes your happier^^

    Edited by tinman
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 hour ago, tinman said:

    "2","0","0","2","16","admin","0","HC_user","1","1","0"

     

    that admin can be in your case as well email adress, check "SELECT * from NEW_Property where Device_id = 2"

     

    Edit: not sure is New_Device is still being in use, anyway, let's try if that makes your happier^^

    Awesome - thanks for this.  Interesting that I thought this table designated user/superuser - but it seems that's all done in another table. 

     

    I'll give this a go now - thanks again :)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • OK adding that to the New_Device table worked - thanks.

     

    I also had to tweak some changes I did the the New_Property table where I set the UserType to the wrong value.  Interestingly the UserType has to be set to

    Please login or register to see this code.

    (notice single quote ['] followed by double quote ["]).  So this worked for me:

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0

    that's right, some values need double quoted values like UserType, so yes "superuser" as value is correct.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...