- OpenX Community Forums

Welcome Guest ( Log In | Register )

 
Closed TopicStart new topic
> Reset Admin Password? This Thread Is For 2.0!, For 2.4, 2.6 and above: http://openx.org/node/974
snuif
post May 20 2005, 05:38 PM
Post #1


Beginner
*

Group: Members
Posts: 2
Joined: 20-May 05
Member No.: 5,661



Hi

Is there a way i can reset my admin password and username. I had a look at the documentation and it told me that the admin configuration is stored in the config.inc.php file. But i couldnt find anyone info there. Is there a way that i can check in the database where it is stored and if so where. If not what to do next? Any ideas?

Thanks
Go to the top of the page
 
+Quote Post
snuif
post May 21 2005, 11:45 AM
Post #2


Beginner
*

Group: Members
Posts: 2
Joined: 20-May 05
Member No.: 5,661



The username and password of the administrator are stored inside the database and
is encrypted using a one-way MD5 hash. This means it is impossible to retrieve a lost
password. However it is possible to set the password to a default value which you then
can use to login. After using the default password to log into the administrator interface
you need to change the password again. To set the password to the default you need to
access the database directly using the mysql commandline interface or another tool such
as phpMyAdmin and execute the following SQL query:
If you used a different table prefix during the installation of phpAdsNew, please make
sure you use the correct table name. After executing this query you can log into the
admin interface using your old username and the password ‘secret’ (without the quotes).

UPDATE phpads_config SET admin_pw = '5ebe2294ecd0e0f08eab7690d2a6ee69';
Go to the top of the page
 
+Quote Post
debswild
post May 31 2005, 05:12 PM
Post #3


Beginner
*

Group: Members
Posts: 1
Joined: 1-October 04
Member No.: 3,093



Thank you it worked great!!
Go to the top of the page
 
+Quote Post
matthewmurcia
post Aug 7 2005, 02:57 PM
Post #4


Member
**

Group: Members
Posts: 13
Joined: 6-July 05
Member No.: 6,307



Has just worked like a charm for me biggrin.gif Thankyou. Maybe a 'Forgot your password?' link could be included on the login page though..This would be useful for clients who don't have the possibility of accessing phpmyadmin, executing an SQL query with an MD5 hash, even if they knew what that was biggrin.gif
Go to the top of the page
 
+Quote Post
Mark D
post May 31 2006, 12:54 PM
Post #5


Beginner
*

Group: Members
Posts: 5
Joined: 30-May 06
Member No.: 11,300



QUOTE (toon @ Feb 27 2006, 01:14 PM) *
I am having the same problem, where I had used the admin manual to change the pw with

UPDATE phpads_config SET admin_pw = '5ebe2294ecd0e0f08eab7690d2a6ee69';

and I am still unable to login using the pw it creates. According to my README file, Im using phpAdsNew 2.0.4-pr2. Should I do the upgrade to 2.0.7? would that fix the problem?


Sometimes it's better if you run the MD5 hash function within the DB itself it often helps.

Try UPDATE phpads_config SET admin_pw = MD5('secret');

Obviously you can use anything in place of the word secret
Go to the top of the page
 
+Quote Post
hirschma
post Sep 5 2006, 04:35 PM
Post #6


Beginner
*

Group: Members
Posts: 1
Joined: 5-September 06
Member No.: 12,596



QUOTE (seeker @ Aug 24 2006, 07:39 PM) *
I tried this and while the SQL commands go, I can't login.
I go to the login screen: adserv/admin/index.php
try to login, and it tries and just goes back, empties all the fields and blah nothing happens.
What do I do? =/

Possible Solution:

I had the same situation. The problem isn't a forgotten password, but that something is rewriting your php.ini config file. In my case, I was using a desktop installer that resets the .ini file each startup (and therefore, has a wrong value for register_long_arrays (off instead of on). Once that was correct, everything worked fine again.

FYI.

jh
Go to the top of the page
 
+Quote Post
PageUp
post Sep 18 2006, 10:44 AM
Post #7


Beginner
*

Group: Members
Posts: 1
Joined: 18-September 06
Member No.: 12,798



Thank you very much for taking the time to post the solution, hirschma.

It appears that it only affects us on PHP 5, that have register_long_arrays disabled by default. On my previous server with PHP 4, I didn't have this problem.
Go to the top of the page
 
+Quote Post
John - theMouthP...
post Nov 7 2006, 12:41 PM
Post #8


Beginner
*

Group: Members
Posts: 3
Joined: 7-November 06
Member No.: 13,655



Unfortunately this doesn't work for me. i can't even remember which version of phpAdsNew I am running. Is there any other thing I can try. I can get to the MySQL database no problem obviously, but running the two SQL queries mentioned here don't seem to work for me.

Any advice please?

Many thanks.

EDIT: scrap that sorry, I wasn't using Caps in the username when I guess I should have been. For anyone else experiencing this issue, you may wish to check you are entering your username correctly which is case sensitive.
Go to the top of the page
 
+Quote Post
LazyCat
post Jan 22 2007, 01:21 AM
Post #9


Beginner
*

Group: Members
Posts: 8
Joined: 16-November 06
Member No.: 13,875



MySQL said:
#1146 - Table '*****.phpads_config' doesn't exist

Wait... changed table prefix and it worked like a charm!
Thank you!
Go to the top of the page
 
+Quote Post
koko
post May 30 2007, 08:04 AM
Post #10


Beginner
*

Group: Members
Posts: 1
Joined: 30-May 07
Member No.: 16,753



QUOTE (spoonman @ May 27 2007, 11:02 AM) *
I can also not log in.

My php installation was recently updated from 4 to version 5.2.2.
register_long_arrays is set to On, still I can't log in.

Neither can I change the admin password, because no rows of the database are affected by the sql command that was suggested.


I had the same problem with openads and postgresql - openads could connect to the database, even create the tables but there were not a single row in the openads_config table. Found the problem in my case: i have been using international characters in some of the input boxes (éáő etc. in the company name for example) upon installation. Did the installation again without those and it worked fine. Now i found out that it has something to do with the database encoding - i created a unicode database in postgre for openads and that obviously was wrong, as postgre encoding errors are starting to come up whenever i use these characters in the openads admin menu. Dont know why, will find out tomorrow, but meanwhile you can try the same, maybe it works for you too.

k
Go to the top of the page
 
+Quote Post
DieGoth
post Jun 19 2007, 10:25 PM
Post #11


Beginner
*

Group: Members
Posts: 5
Joined: 19-June 07
Member No.: 16,979



I had a similar problem recently.

My server runs PHP 5.x and I have installed the latest OpenAds available. I have been using it since three months ago and it is working fine.

My server is only for OpenAds, so it is installed directly in root.

The problem began when I made a new folder in root for a second installation. My first installation was running fine but my second one was not recognizing the password.

As I installed the second OpenAds it worked fine and I configured it as well as the first one. I was able to login that day, but the next week I couldn't login.
I have turned on register_long_array and test.php says it is on.

Both OpenAds installations are using the same database. The older one is using the default table names. The second installation is using tables with a prefix. I set the prefix during installation, and it worked then.

I have changed the password in the database for the second OpenAds installation. No matter what password I set in MD5, I coudln't login yet in the second installation.

Then I realized that I was loggin in both accounts at the same time. I log out from the older installation and then I was able to login in the newer.
Go to the top of the page
 
+Quote Post
Erik Geurts
post Jun 20 2007, 03:14 PM
Post #12


Mentor
********

Group: Moderators
Posts: 2,112
Joined: 23-May 04
From: Netherlands
Member No.: 2,079



Wild Guess: do you perhaps use Firefox and have you set it to remember passwords? If so, and if you're using the same username on both instance, then it could be that Firefox is inserting the wrong password in the second instance.
Go to the top of the page
 
+Quote Post
frankm
post Dec 19 2007, 03:38 PM
Post #13


Member
**

Group: Members
Posts: 12
Joined: 19-December 07
From: Toronto, Canada
Member No.: 19,489



The problem is that in the latest OpenAds there is no table called {prefix}_config. It's actually called {prefix}_preference .

So the command should be:
UPDATE phpads_preference SET admin_pw = '5ebe2294ecd0e0f08eab7690d2a6ee69';

or in most cases (depending on the selected prefix):
UPDATE oa_preference SET admin_pw = '5ebe2294ecd0e0f08eab7690d2a6ee69';

HTH,
/FM
Go to the top of the page
 
+Quote Post
Arlen Coupland
post Jul 29 2008, 09:10 AM
Post #14


Mentor
Group Icon

Group: OpenX Support
Posts: 7,576
Joined: 28-November 06
From: London, England
Member No.: 14,171



This thread was for 2.0 users - for 2.4 and above please see:
http://www.openx.org/node/974
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

 

Locations of visitors to this page