Lost Admin Password

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Lost Admin Password

Post by firebuff55123 »

I have lost my admin password. I cannot remember it. Is there a way to get a temp
password sd=o I can reset it?

firebuff55123
Last edited by JimA on Sat Sep 09, 2017 8:37 am, edited 1 time in total.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Lost Admin Password

Post by 3Di »

This script is for 3.1/3.2, instructions are there - at a first glance.
https://gist.github.com/3D-I/416f0298bf ... f7ddbfad0c
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Re: Lost Admin Password

Post by firebuff55123 »

I am sorry but all this script returns is:
Casnnot log in as a different usertan a admin usert

I cannot still login as administrator.

firtebuff55123
User avatar
JimA
Former Team Member
Posts: 7833
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Lost Admin Password

Post by JimA »

In phpMyAdmin, run the following, which will create an admin user named Admin1 with a password of admin. From that point you should be able to get into the ACP.

Code: Select all

INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin1', 'admin1', 0, '21232f297a57a5a743894a0e4a801fc3', '[email protected]', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '');
Change your table prefix if it is not phpbb_

See Executing SQL Queries in phpMyAdmin if you are unfamiliar with running database queries.

As soon as you have done this, use the temporary admin account to change the details on the original admin account, then delete the temporary account.
This is because:
  1. anyone could use that account to log in to your board if you didn’t change the password.
  2. this temporary user has not been fully set up (e.g. it is not a member of the “Registered users” group, so it won’t have normal access to your forums).
To remove the account you will first need to remove “founder” status from it: ACP > USERS AND GROUPS tab > Manage Users > Admin1 > Overview > Founder = No
Jim Mossing Holsteyn - Former Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Lost Admin Password

Post by 3Di »

Jim, that's exactly what the Script does already. Not sure what's the OP's issue here.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Re: Lost Admin Password

Post by firebuff55123 »

So change the prefix of all the phpbb tables in the database?

Or alter the code of the script to feflect the different phpbb table names?

firebuff55123
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Lost Admin Password

Post by 3Di »

firebuff55123 wrote: Sat Sep 09, 2017 11:24 pm So change the prefix of all the phpbb tables in the database?

Or alter the code of the script to feflect the different phpbb table names?

firebuff55123
You don't need to alter my code, it already takes care of any DB supported by phpBB itself. ;).
I believe you didn't get the concept of it, the script creates a new founder with which you can amend your original account. etc..
will create an admin user named Admin1 with a password of admin
You must use it, not your credentials.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Re: Lost Admin Password

Post by firebuff55123 »

I am, sorry but I cant this script to work...


General Error
SQL ERROR [ mysql4 ]

Field 'user_occ' doesn't have a default value [1364]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

firebuff55123
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Lost Admin Password

Post by 3Di »

Seems like you have a 3.0.x board, if so you should use this one instead:
https://gist.github.com/3D-I/599acb267e ... 4a5dbe1f4a
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Re: Lost Admin Password

Post by firebuff55123 »

Now I get thjis error,,., please help me!

General Error
SQL ERROR [ mysql4 ]

Duplicate entry 'admin1' for key 'username_clean' [1062]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Lost Admin Password

Post by stevemaury »

Have you tried clicking the "I forgot my password" link on the login page?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
firebuff55123
Registered User
Posts: 22
Joined: Wed Oct 16, 2013 1:14 am

Re: Lost Admin Password

Post by firebuff55123 »

That is for the login account not the Admin account.. I wish the was such a
button on the login account

I need a proceedural list of all the steps requiored to reset the passwordf.
I am a 71 year old man with a stroke and a heart attack. Sush proceeedures are no
no longer easy for me.

firebufdf55123
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Lost Admin Password

Post by stevemaury »

The Admin account IS a login account. Put that username in the login box and click the I forgot password link. You need to know the email address of the Admin account (the one you provided at installation).
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Nick225
Registered User
Posts: 131
Joined: Sat Nov 24, 2018 7:48 pm

Re: Lost Admin Password

Post by Nick225 »

I have struggled so much with my host about db connection issues; I had to uninstall and reinstall 3 times.. Then I had to spend the next 2 days trying to get the conversion to work. The site is huge and I kept losing database connection after over 300000 rows on one of the forum.. That happened 3 times. so frustrating. Through phpadmin, I deleted bunch of data and finally got through. It took me days and nights. So exhausted.

The problem now is I forgot my admin password after all that drama. I clicked on the "forgot password". They sent me an email that never arrived. I can sent myself an email at that same address and I receive it right away...

So I am stuck. I can't go through this convert/reinstallation process again on this old huge database.
I just saw a solution to create a dummy admin. But it doesn't work. I kept getting "field user_type doesn't exist" among others.

I was writing a message for 911 HELP. But I decided to search this site more.

THEN I saw this topic. I ran the script and it works like a charm.
THANK YOU !!!!! THANK YOU. I have been doing for a long time but never lost my admin password.. I was going to hang myself..

THANKS a bunch for this GREAT solution !!!!!!!!!!!!!!!!!!

Note: The first few lines of the post is what I was writing while still looking. I had to share it with you guys. :) :)
RobertCailliau
Registered User
Posts: 11
Joined: Tue Oct 02, 2012 11:54 am

Re: Lost Admin Password

Post by RobertCailliau »

Sorry to revive this thread, and hoping firebuff55123 is still with us.
Well, firebuff55123 was right:

JimA wrote the SQL statement that I had to use also, and it works well. Thanks JimA.

But JimA also wrote:
Change your table prefix if it is not phpbb_
and that should have been
Use your table prefix if it is not phpbb_

firebuff55123's confusion was understandable and his question perfectly right.
We all need to re-read our writing before sending it off, though I also understand that time is short. And I am 74 years old, little time left.
Anyway, thanks again JimA for the answer.
Robert Cailliau
Post Reply

Return to “[3.2.x] Support Forum”