Delete Admin user by mistake 9.3

Hi!
I deleted the useradmin by mistake and It doesn’t work to enable superadmin in xwiki.cfg.

I get error that i don’t have the rights to run velocity macros.

There is any way to fix that?

BR
Danny

Hi

See http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Access%20Rights/Permission%20types/#HScriptRight

It’s the last author of the page that needs to have the permissions, not the currently logged in user.

So you need to either recreate you Admin user (simplest) or resave all pages with a user having the script right. See also:

How can I recreate the User whose was both the last author and the creator admin of the wiki.
I cannot do anything in the wiki pages.

You can go to the URL of that user and you should be able to restore it from there.

But that’s won’t be enough since this user won’t have any right anymore (it has been cleaned from all the groups when you deleted it). So you would also need to go to http://mydomain/xwiki/view/XWiki/XWikiAdminGroup page, use object editor and add the user you restored in that group.

Hi!
I found the users I did as you wrote but not everything is back in place. Sorry I’m new working with Xwiki
image

You sure you added it to the admin group ? Maybe you changed rights of the admin group (which have all the rights by default).

Hi Thomas,
Thanks for your help. I fixed it. You saved my day.
//Danny

You’re welcome :slight_smile:

Hi, I have the same issue with dgradim
However, when I go to the URL of that user, I don’t know how to restore it.
2018-05-11_213040
Can somebody help me in this case?
Many thanks!

According to this screenshot the page you are trying to access is not deleted.

Maybe you already restored it but did not rollbacked the admin group ? Or maybe this is not the right user.

Hi, I am afraid to report the same mistake. What happened:

  • Started with a new instance of xwiki that has been created with a initial user
  • Began configuring, created new user, added him to the admin group, deleted initial user
  • nothing bad happened so far, until i got to a setting further down where i could set the wiki owner (?), changed the initial user to my new one
  • then got the same problem that has been reported here.

What I did since then:

  • activated superadmin
  • restored my initial user
  • tried to access the page where i changed the wiki owner via browser history in order to roll it back, but this does not work. There is nothing that I can do on this page, it is full of error messages.

Is there anyone able to help me out? Thanks in advance!
Matt

I have used all recommendations I’ve found here. Now I was able to revert the "PLATFORM.WIKI.SHEET.PROP.OWNER " back to the initial user and things got a little better - but I do still have major trouble. I’ve attached a screenshot to illustrate all the technical names I’m seeing, also the menu on the right is entirely empty.

Also, one thing that seems strange is: I can display the profile page of my new user with the superadmin, even not logged in at all - only my initial user gets an error message when trying to display this page.

I have tried both add ons that have been mentioned in this thread in order to change the creator/author on all pages I could find to my initial user, but still no success. What am I doing wrong - or is my xwiki instance entirely screwed?

Thanks in advance…

31_mod

edit: I deleted the database and started from scratch. So no need to answer anymore, just in case someone stumbles upon this :slight_smile: