How to recover superuser after using recovery script?

Background

I had to apply the recovery script (https://github.com/splitbrain/dokuwiki-recover, 93fce60, 31. Aug. 2020) because the wiki did not work after installation of plugin "code3".? I followed the instructions that appeared when executing the script, in which one step were saying:

Question

How to perform the mentioned step ("Change the superuser configuration back to contain your usual admin account")?

Upvotes: 0

Views: 72

Answers (1)

In order to perform the mentioned step ("Change the superuser configuration back to contain your usual admin account"), the file local.php in folder "/config" has to be changed to

<?php
/**
 * Dokuwiki's Main Configuration File - Local Settings
 * Auto-generated by install script
 * Date: ...
 */
$conf['title'] = '<YourDokuWikiName>';
$conf['lang'] = '<YourLanguage>';
$conf['license'] = '<YourDokuWikiLicense>';
$conf['useacl'] = 1;
$conf['superuser'] = '@admin';
$conf['disableactions'] = 'register';

...by removing the lines that have been added by the recover script

// The following lines were added be dokuwiki-recover
// 2021-...
$conf['useacl'] = 1;
$conf['authtype'] = 'authplain';
$conf['superuser'] = '@dokuwiki-recover';
$conf['userewrite'] = 0;
$conf['lang'] = 'en';
$conf['template'] = 'dokuwiki';

The obvious reason is that the last php assignment wins, and hence...

$conf['superuser'] = '@dokuwiki-recover';

...made all users of group dokuwiki-recover to adminintrators.

Upvotes: 0

Related Questions