Log in

View Full Version : Lost admin privileges


mhamdi
10-23-2005, 04:43 AM
Hi,
I lost the admin privileges by changing the permissions of the main account. How can I restore them without reinstalling from scratch. I have access to the files in the server.
Thanks

Adrian Schneider
10-23-2005, 05:03 AM
You could run the query:
UPDATE user
SET usergroupid = 6
WHERE userid = 1
LIMIT 1
This is assuming your are userID 1.

If you don't have SQL access, create a file and run it from the vBulletin directory:
<?php

require_once('global.php');
$db->query_write("
UPDATE user
SET " . TABLE_PREFIX . "usergroupid = 6
WHERE userid = 1
LIMIT 1
");

?>

or for 3.0.x.

<?php

require_once('global.php');
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET usergroupid = 6
WHERE userid = 1
LIMIT 1
");

?>

mhamdi
10-23-2005, 05:33 AM
Thanks a lot :)

Marco van Herwaarden
10-23-2005, 06:35 AM
There is a tools.php in your don_not_upload folder of your vB zip-file. You can use that to restore admin permissions.