Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reset Admin Username and Password


caryne444

Recommended Posts

Great contribution to reset password in admin. However, when I get to admin, I get the following message;

 

Error: Invalid administrator login attempt.

 

This is for a test site in a directory copied from an esisting site.

 

Any help will do

 

Felix

Link to comment
Share on other sites

Try running this in your SQL

 

DROP TABLE IF EXISTS administrators;

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)

);

 

This is what i had to do as i kept getting the same message that it was an incorrect login.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

I am amazed at the responses to newbie's password problems without making sure WHICH password they are having trouble with. Thinking some are truncating the administrators table but having trouble with directory passwords, read this...

 

If you are still having password problems.....

 

Is the username and password that you cannot get past in an OS Commerce web page? That is, a input box on a web page? Ok, then the administrators table is where you username and password is stored.

 

 

Is the username and password that you cannot get past in a pop up window? Then that password is NOT in the database. You fix this password with you hosts control panel function called "directory security" or "password protect directories" or something like that. The username/password combination is called from the .htaccess file, and the username/password is stored in a named file within that .htaccess file which may have been corrupted by an add-on or yourself editing/deleting it. You should not edit the username/password part of the .htaccess file or the called file. Look for the following in your .htaccess file:

AuthType Basic
AuthName "Password Required"
AuthUserFile /www/passwords/password.file
Require valid user 

 

The AuthUserFile must be found where it says it is and must have your username/password within it:

admin:fdah5kj4q50fasehikaf408fahf489a

Where admin is the plain text user name and the junk afterwards is the encrypted password. THIS USERNAME AND PASSWORD CANNOT BE RESET BY DELETING IT. You must use your hosts control panel.

 

 

Now, please ask specific questions regarding exactly which username/password combination you are having trouble with.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

1. In my case, It's the username and password in admin that I'm struggling with. I keep getting the message 'Error: Invalid administrator login attempt.' In a pink line at the top of the admin page.

 

2. I don't know if it's related to this, but I keep getting an error message of a page not found on clicking on my products in the store front, the rest of the menu/information menu items appear fine.

 

I created this store from an existing store, and I did the necessary changes in the configure files of both the admin and catalog. I wonder if it's that all I need to do.

 

Is there a specific file I may need to post to help detect the problem?

 

Any help will be appreciated.

 

Felix

Link to comment
Share on other sites

1. In my case, It's the username and password in admin that I'm struggling with. I keep getting the message 'Error: Invalid administrator login attempt.' In a pink line at the top of the admin page.

 

2. I don't know if it's related to this, but I keep getting an error message of a page not found on clicking on my products in the store front, the rest of the menu/information menu items appear fine.

 

I created this store from an existing store, and I did the necessary changes in the configure files of both the admin and catalog. I wonder if it's that all I need to do.

 

Is there a specific file I may need to post to help detect the problem?

 

Any help will be appreciated.

 

Felix

What may help is your true domain name, and both of the configure.php files without the database information at the bottom.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Which password, and what version of osC?

 

Thanks for the offer Mark

 

This is a test site and the domain in wwww.ukuphilawellness.com/yebocom/ and is a copy of a store in root directory.

 

Catalog configue:

 

<?php

define('HTTP_SERVER', 'http://www.ukuphilawellness.com/yebocom/');

define('HTTPS_SERVER', 'http://www./ukuphilawellness.com/yebocom/');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'www.ukuphilawellness.com/yebocom/');

define('HTTPS_COOKIE_DOMAIN', 'www.ukuphilawellness.com/yebocom/');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/user/public_html/ukuphilawellness.com/yebocom/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

 

In admin

 

<?php

define('HTTP_SERVER', 'http://www.ukuphilawellness.com/yebocom/');

define('HTTP_CATALOG_SERVER', 'http://www.ukuphilawellness.com/yebocom/');

define('HTTPS_CATALOG_SERVER', 'http://www.ukuphilawellness.com/yebocom/');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/ukuphilawellness.com/yebocom/');

define('DIR_WS_ADMIN', '/power/');

define('DIR_FS_ADMIN', '/home/user/public_html/ukuphilawellness.com/yebocom/renamedadmin/');

define('DIR_WS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home/user/public_html/ukuphilawellness.com/yebocom/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

Thanks in advance

 

Felix

Link to comment
Share on other sites

Fix your configure files.

 

Your http server is http://www.ukuphilawellness.com

Your catalog is at /yebocom/

Your cookie path needs to be at a different path if you have a catalog at root also, otherwise it's ok.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Working on it, thanks Mark

 

Just to confirm;

define('HTTP_SERVER', 'http://www.ukuphilawellness.com/'); ?

and

define('DIR_FS_CATALOG', '/yebocom/'); ?

 

When doing this I'm pointed to the ukuphilawellness shop instead of the herbalsa.com shop from which I copied to create the yebocom directory.

What I had done was copy another shop, herbalsa.com which is in the root, and from it created yebocom. This yebocom is a directory of ukuphilawelless.com.

 

Therefore, I was expecting to have the same shop the yebocom directory as herbalsa.com, instead I'm directed to the ukuphilawellness shop

 

 

Hope I make sense

Link to comment
Share on other sites

Which password, and what version of osC?

 

Hi Mark,

 

I've upgraded from MS 2.2 to RC2a

 

After the upgrade (using the contribution) I could no longer login to the administrator part of the site. After I found out that MS uses a htaccess file I created the administrator table in the database (which RC2a uses) in the hope this would get things going again.

 

Only after I used the reset.php file from another contribution (which does NOT work with htaccess files...) I could login again. However the table in the database remained empty. As you can understand I'm quite baffled by this :'(

Link to comment
Share on other sites

  • 5 weeks later...

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?

 

I tried your method and now i get this when i go to login in:

1146 - Table 'blackrp4_osc1.administrators' doesn't exist

 

select id from administrators limit 1

 

any ideas of what went wrong?

thanks!

Link to comment
Share on other sites

Risela

I think you may have deleted the table not emptied it.

 

Using your control panel go to phpmyadmin. Open your oscommerce data base. Click on the sql tab and enter the following in the box

 

DROP TABLE IF EXISTS administrators;

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)

);

 

Click on go.

 

This will create a new table in your database.

 

Go to the login page on your stores admin and enter a new password and user name.

 

This should work.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Risela

I think you may have deleted the table not emptied it.

 

Using your control panel go to phpmyadmin. Open your oscommerce data base. Click on the sql tab and enter the following in the box

 

DROP TABLE IF EXISTS administrators;

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)

);

 

Click on go.

 

This will create a new table in your database.

 

Go to the login page on your stores admin and enter a new password and user name.

 

This should work.

 

Oh Thanks for helping....I spent hourse before seeing this.I'm so grateful!

Link to comment
Share on other sites

  • 3 weeks later...

I'm having all kinds of problems with the admin login as well. It was working fine and now its not. I DO NOT have htaccess setup. I followed the instructions for dumping the admin table in the dbase. Here's what I get when I navigate back to the admin directory:

 

Error: Invalid administrator login attempt.

No administrators exist in the database table. Please fill in the following information to create the first administrator. (A manual login is still required after this step)

 

It's like the login process is running before I even try to enter anything. If I enter a new user name and password and then try to login I'll get the Invalid adminstrator login attempt right away. The rest of the store is working perfectly. FWIW, as soon as I navigate to the admin directory that first error will display without me even having tried to login.

 

Anyone have any ideas?

 

Thanks.

 

Oh Thanks for helping....I spent hourse before seeing this.I'm so grateful!

Link to comment
Share on other sites

  • 1 month later...

This works fast and easy:

 

From your control panel (Cpanel) go to PhpMyAdmin, click on your database to enter, click on SQL tab and paste:

 

INSERT INTO `administrators` VALUES (1, 'admin', '55340159dccd929e0cd2abd72cfe799a:14');

 

Paste into "Run SQL query/queries on database blah, blah, blah form, click GO. The database will update to the new user and password. Go to your OsCommerce Admin and use "admin" for the user name and "admin" for the password. Once in Admin change the password under the "Administrators" category. Click on the last user name you used and edit it to a new user name and password. done.

 

Hope this helps

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...