Setup already completed
The admin password has already been set. To change it, use the MediaWiki user interface or maintenance tools.
"; exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $password = $_POST['password'] ?? ''; $confirm = $_POST['confirm'] ?? ''; if ($password !== $confirm) { $error = "Passwords do not match."; } elseif (strlen($password) < 6) { $error = "Password must be at least 6 characters."; } else { $safePassword = escapeshellarg($password); $output = []; $return = 0; exec("php /var/www/html/maintenance/run.php changePassword --user=admin --password=$safePassword", $output, $return); if ($return === 0) { file_put_contents($flagFile, "Admin password set on " . date('c') . "\n"); echo "The admin password has been updated. You can now log in and start using your wiki.
"; exit; } else { $error = "Failed to update password. Please check server permissions."; } } } ?>This is a one-time setup page to secure your MediaWiki appliance. After submitting, this setup interface will be disabled.
= htmlspecialchars($error) ?>