Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

caryne444

Reset Admin Username and Password

43 posts in this topic

I've migrated my site to another host and now the Admin username/password does not work. In what file can I reset the Admin Username and Password?

 

Thanks!

Share this post


Link to post
Share on other sites
Hi Karen what version of osc are you using?

 

I am also having this problem. Currently using RC 2.2 or something around there i believe. I used to be able to do this very easily. Something like clearing the username and password columns in the administrator table in phpMyAdmin, then I could simply input new values on the login.php page.

 

If you can give me instructions on this, or another simple way to change the username/password it would be much appreciated.

 

I've had people say you can edit the value through phpmyadmin and input a new encrypted password, but I dont see where exactly to put in this new value, nor do I see an old one.

 

help please!

Share this post


Link to post
Share on other sites
I've migrated my site to another host and now the Admin username/password does not work. In what file can I reset the Admin Username and Password?

 

Thanks!

 

 

If I am not mistaken, you have to edit the config.php under Admin.

Share this post


Link to post
Share on other sites
If I am not mistaken, you have to edit the config.php under Admin.

 

If it was a problem loading his mysql database, but for the password to the admin login it is saved differently.

Share this post


Link to post
Share on other sites

I have the exact same problem. I am using osCommerce 1.5 though...

 

I migrated to a new server and everything works fine except the /admin username and password did not migrate with the rest of the site. I now do not have access to my /admin and I really need to get in there to ship some orders. Anyone know what to do?

 

thanks a lot.

Share this post


Link to post
Share on other sites
I have the exact same problem. I am using osCommerce 1.5 though...

 

I migrated to a new server and everything works fine except the /admin username and password did not migrate with the rest of the site. I now do not have access to my /admin and I really need to get in there to ship some orders. Anyone know what to do?

 

thanks a lot.

 

i believe older versions store passwords in .htaccess files. check the .htpasswds folder in the root directory of your ftp client and see if there is an admin folder in there, then try editing the file associated with it and look to see if the password is in there. If that dosnt work check the admin folder in your osc setup and edit the .htaccess file in there.

Share this post


Link to post
Share on other sites
i believe older versions store passwords in .htaccess files. check the .htpasswds folder in the root directory of your ftp client and see if there is an admin folder in there, then try editing the file associated with it and look to see if the password is in there. If that dosnt work check the admin folder in your osc setup and edit the .htaccess file in there.

 

You should be able to do this through your webs site control panel, under password protect directories or similar

Nic

Share this post


Link to post
Share on other sites
You should be able to do this through your webs site control panel, under password protect directories or similar

Nic

 

Yup

 

Anyone know what to do with 2.2 though?

Share this post


Link to post
Share on other sites

 

Newbie response to similar problem.

 

I didn't follow any of that, if you've lost your admin login, just delete oscommerce and reload it! Viz Top Tip

 

Is there no simple explanation for this? Many systems send a reminder mail, nothing like that on os?

 

If you have no idea how .htaccess or config.php works you're stuck, as passwords / users are not going to be in plain text for obvious reasons.

Any other ideas? Thx.

Share this post


Link to post
Share on other sites

RC:

 

open up phpmyadmin

empty the admininstrators table

revisit your admin section.

 

Pre RC:

Amend htaccess in website hosting control panel

 

Thats not difficult at all, is it?

Share this post


Link to post
Share on other sites

Newbie response to similar problem.

 

I didn't follow any of that, if you've lost your admin login, just delete oscommerce and reload it! Viz Top Tip

 

Is there no simple explanation for this? Many systems send a reminder mail, nothing like that on os?

 

If you have no idea how .htaccess or config.php works you're stuck, as passwords / users are not going to be in plain text for obvious reasons.

Any other ideas? Thx.

If you use the older versions of osC, or even if you have a new version with the admin directory protected by .htaccess then the way to reset your password is this:

 

Log in to your website cPanel. Select the admin directory and select remove directory passwords. Then, select the directory and select Password Protect Directory. Put in your new username and password.

 

If you do not have a cPanel then looking in the .htaccess file it will say exactly where your password file is. Say it is at /public/your_site/passwords

On a command line enter htpass /public/your_site/passwords username

where username is the name of the administrator you want to use. Press return and it will prompt you for a new password.

 

Very few persons have command line access. But if you do, this will fix your problem. If you do not have cPanel nor command line access then how did you protect the directory in the first place? Call your host. They can fix it for you.

Share this post


Link to post
Share on other sites

Hi Karen!

 

It may be too late to replay since I got the same situation like your case to migrate a shop to a new box.

 

My solution is:

 

1). install a blank new oscommerce 2.2 to a directory other than the production one.

2). Create an "Admin" account with new known password (it doesn't matter whether both the new or old "Admin" IDs are the same).

3). Use Webmin (my favour web admin tools. PhpAdmin or other similar is OK for you) to copy the encrypted password string from the newly created "blank shop" admin table to the migrated production shop.

4). Cheers !!!

Share this post


Link to post
Share on other sites

I have just had a similar problem. My user name and password although it had been working, no longer worked. I tried the add on suggested earlier, and by resetting it using phpmyadmin. Neither worked. In the end i had to totally delete the administrators table from the database. I re installed the table using the section from the sql file in a standard install of oscommerce. Hey presto when i then tried to enter a new password and user name it worked. I just wish i knew what went wrong.

Share this post


Link to post
Share on other sites

I've upgraded my shop from 2.2 MS2 to 2.2 RC2a using the contribution however I can not login to the admin part of the shop anymore. I know that in MS2 there was no administrators table so I copied it from another RC2a shop I have running. I emptied the table and went to the admin section (as described in this topic and http://www.clubosc.com/forgotten-your-admin-password-shock-horror.html ) but I still cannot login, nor was I asked to create an administrator account...

 

No idea what to do next, anyone??

Share this post


Link to post
Share on other sites

Oh wait, you have the author of this contribution, Nic, (FIMBLE) online.

 

Nic, I have a question, does the fact your contribution work so easily, say anything about the security of the admin password system?

Share this post


Link to post
Share on other sites

Thanks, this worked. I didn't get offered to enter a new admin password but I could login with the old one...

 

 

I have still one question though; where is the old password stored?? The database table administrator remains empty :o and the reset.php doesn't work with htaccess files... :blink:

Share this post


Link to post
Share on other sites

Hey everyone,

 

Another newbie here!

 

I have looked all over the place and still can't find an answer..

 

I have reset my admin user name fine, but the password, I forgot to encrypte it and now I can not access my shop/admin/

 

I have looked in MyPHPmyAdmin and there is no administrators table!?

 

The two files .htaccess and .htpasswd are in the shop/admin but not in FTP?!

 

Just want to know besides the obvious, how to change it and/or delete it!?

 

Thanks,

 

Rob

Share this post


Link to post
Share on other sites

Rob,

 

Use phpmyadmin to run this:

 

CREATE TABLE administrators (

id int NOT NULL auto_increment,

user_name varchar(32) binary NOT NULL,

user_password varchar(40) NOT NULL,

PRIMARY KEY (id)

);

 

Then, go to your admin using your URL (www.yourdomain.com/catalog/admin) and you will be notified that there is NO default admin username and password. Enter one, this becomes your default log in to your admin area.

 

 

 

Chris

Share this post


Link to post
Share on other sites

Oh wait, you have the author of this contribution, Nic, (FIMBLE) online.

 

Nic, I have a question, does the fact your contribution work so easily, say anything about the security of the admin password system?

 

 

Hi

No it does not, it calls in the application top which gives via configure.php files access to the database just the same as any other file with SQL queries in it.

All it is really is just on query, the same as you run via phpmyadmin TRUNCATE `administrators` all this does is to empty the table, thats it!

It is intended for users who are not confident with phpmyadmin.

It is good practice to delete the file after use thought !!

The user + passwords for admin are safe enough.

Nic

Share this post


Link to post
Share on other sites

Rob,

 

Use phpmyadmin to run this:

 

CREATE TABLE administrators (

id int NOT NULL auto_increment,

user_name varchar(32) binary NOT NULL,

user_password varchar(40) NOT NULL,

PRIMARY KEY (id)

);

 

Then, go to your admin using your URL (www.yourdomain.com/catalog/admin) and you will be notified that there is NO default admin username and password. Enter one, this becomes your default log in to your admin area.

 

 

 

Chris

 

Chris,

 

Thanks for the reply!

 

I have successfully created the administrators table in phpmyadmin, did what you said but it is still asking for a user name and password.. saying "To view this page, you must log in to this area on (my site)" Then I enter a new user name and password then it says "The user name or password you entered for this area on (my site) was incorrect. Make sure you’re entering them correctly, and then try again."

 

So I am guessing the user name and password are stored somewhere else maybe?! Just don't know where?!

 

I know the two files .htaccess and .htpasswd are in (https://secure.mysite.com.au/shop/admin/) but I can not access them?!

 

Cheers,

 

Rob

Share this post


Link to post
Share on other sites