Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin Password Error


uksupafly

Recommended Posts

I've just installed osCommerce-2.2rc1 (the latest stable edition) but I'm having trouble with the new Admin security. Is there something obvious I should do before I should try to access it?

 

When I type in the username and password I set during intallation I get this message:

 

Error: Invalid administrator login attempt.

 

I've double checked spelling/case etc. and tried a complete re-install but got the same message.

 

Any help would be appreciated.

 

Les

 

ps. this is the new built-in admin security sytem, not a .htaccess added by myself or my hosting company.

Link to comment
Share on other sites

Find your .htpasswd file (it should be in the base /catalog directory)

 

open it and you'll see something like this

 

admin:fhskgsi42dk294d

 

Delete that line then go here and generate a new username and password - paste that into your htpasswd file, save it and login again with your new details (use the plain-text password, not the encrypted one).

 

DoA

Link to comment
Share on other sites

You need to .htaccess your /catalog/admin directory so that it is password protected. You

can use the password manager in your server admin area like cpanel.

 

 

 

 

So in your case You have transfered a site from other server so it should be having an htaccess with it.Just delete it.Later YOu can use cpanle password protect directory to get protect it.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Thanks for your help but this is the new access password that is installed with the latest default osCommerce installation.

 

I've installed it on a new server from scratch and I haven't set-up a htaccess password on my server yet.

 

I've found the password entry in our database but it's encrypted, but I know I have the correct details that I originally entered.

Link to comment
Share on other sites

I've just tried changing the admin password in the database using the encyption webpage listed above and this hasn't changed anything either :(

 

Any other thoughts?

 

Has anyone installed the latest osC and found the new admin pass works OK?

Link to comment
Share on other sites

i am having the same issue. clean install of rc1, but i can't access admin. i get the same error. i've tried 3 times now. admin dir is properly protected, it's the admin page of osC that's not letting me in.

Link to comment
Share on other sites

i am having the same issue. clean install of rc1, but i can't access admin. i get the same error. i've tried 3 times now. admin dir is properly protected, it's the admin page of osC that's not letting me in.

 

Yep - i'm getting the same issue - go to /admin and get a login page - it used to work until today - now it rejects my username and password with the same error...

 

Any more news of where this is created and how it is tested?

Link to comment
Share on other sites

Sorted it...

 

there is a table in the MySQL that contains the administrator users called (not surprisingly) administrators.

 

You need to make sure you have an entry in here correponding to the login that you are trying to use.

 

If oyu can't remember the password you can recreate a valid encrypted password using the following code...

 

<?php
function tep_rand($min = null, $max = null) {
static $seeded;

if (!$seeded) {
mt_srand((double)microtime()*1000000);
$seeded = true;
}

if (isset($min) && isset($max)) {
if ($min >= $max) {
return $min;
} else {
return mt_rand($min, $max);
}
} else {
return mt_rand();
}
}

function tep_encrypt_password($plain) {
$password = '';

for ($i=0; $i<10; $i++) {
$password .= tep_rand();
}

$salt = substr(md5($password), 0, 2);

$password = md5($salt . $plain) . ':' . $salt;

return $password;
}

if (isset($_REQUEST['action'])){
echo "<p>" . $_REQUEST['word'] . "</p>";
echo "<p>" . tep_encrypt_password($_REQUEST['word']) . "</p>";
}
?>

<html>
<head>
<title>
whats the password?
</title>
<body>
<form>
<input type="password" name="word">
<input type="submit" value="cheese it">
<input type="hidden" name="action" value="create">
</form>
</body>
</head>

 

It is fairly basic i know but it creates a new password using the osCommerce own method and presents it back to you with the encrypted value.

 

Make sure you have a row in the administrators table for your chosen username and the newly recreated password and you'll get through...

 

Hope that helps in some way.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...