From 7f26fa921cfab8bec250542214caca8f0b753341 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Mon, 15 Apr 2019 13:17:54 +0900 Subject: [PATCH] new: [doc] Added note on re-adding admin user. https://github.com/MISP/MISP/issues/3722 --- faq/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/faq/README.md b/faq/README.md index f7f792b..5021c1f 100644 --- a/faq/README.md +++ b/faq/README.md @@ -221,6 +221,28 @@ PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allo In this case you will need to increase the memory_limit option in `php.ini` file +## I deleted the admin user by mistake + + +Now, I only have Org Admin. + +You have several options: + +1. Delete the org admin. MISP automatically creates a new default site admin user if no users are found in the db (mysql: truncate users;) + +2. Upgrade a user to a site admin, such as an org admin user: +``` +SELECT id, email from users; +``` +Note down the ID you want to upgrade. Let's say this is 2 for the example's sake. +``` +SELECT id, name from roles; +``` +Note down the role ID you want to upgrade. Let's say this is 1 for the example's sake. +``` +UPDATE users set role_id = 1 where id = 2; +``` + ## config.php is not writeable ```