There is one admin question that does come up every so often in a while: How can I grant Admin rights to another person? Here is how.
View article
View summary
This howto applies to: Zotlabs|Hubzilla
Zotlabs|Osada
Zotlabs|Zap
Manage admin access via cmd utils
Coming soon to a Zotlabs|* tool near you: Manage admin rights from the command line. This is currently in dev for Zotlabs|Hubzilla and Zotlabs|Zap. To be expected in Hubzilla 4.0 and the Zap 2.4.
Usage:
util/admins
util/admins list
util/admins add <account_id>
util/admins remove <account_id>
Managing admin rights within the database
You will need database root access and select the correct database. How to start the mysql root console differs according to it's configuration, therefore we cannot advise you on that in such a general howto.
If you are connected, select your database, "mydatabase" is just an example, substitute your own:
MariaDB [(none)]> use mydatabase
Database changed
Admin account rights are granted to accounts that have the account_role 4096. Usually it's account No. 1.
select account_id,account_email,account_roles from account where account_id='1';
+------------+-----------------------+---------------+
| account_id | account_email | account_roles |
+------------+-----------------------+---------------+
| 1 | admin@example.com.tld | 4096 |
+------------+-----------------------+---------------+
1 row in set (0.01 sec)
Please compare this account, it does not have admin access rights:
select account_id,account_email,account_roles from account where account_id='2';
+------------+-------------------------+---------------+
| account_id | account_email | account_roles |
+------------+-------------------------+---------------+
| 2 | anothermail@example.com | 0 |
+------------+-------------------------+---------------+
1 row in set (0.00 sec)
So you can for example use the email address to locate the account you are looking for:
select account_id,account_email,account_roles from account where account_email like '%anothermail%';
+------------+---------------------------+---------------+
| account_id | account_email | account_roles |
+------------+---------------------------+---------------+
| 2 | anothermail@example.com | 0 |
+------------+---------------------------+---------------+
1 row in set (0.00 sec)
...and grant that account admin rights:
update account set account_roles=4096 where account_email='anothermail@example.com';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
or use the account_id:
update account set account_roles=4096 where account_id='2';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0