Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disable Admin Login


Dr. Rolex

Recommended Posts

Posted

If you're developing Apps or for some reason don't want to enter an admin username/password again and again, then temporarily, you can do this to completely disable the Admin login or more accurately make a persistent logged in admin user:

 

In ./admin/includes/application_top.php around line 164, find this:

// redirect to login page if administrator is not yet logged in

Add this code above the code you found:

// Temporaryily disable Admin login
tep_session_register('admin');
$admin = array('id' => '1',
		 'username' => 'none');

 

Make sure to have an administrator with id 1 and username none in your config or change the values to the username you currently are using.

Posted

This is Highly Dangerous!!! As you will be hacked unless you don't mind such things

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Posted

This is highly Dangerous!!!! Unless you like getting hacked

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Posted

This is highly Dangerous!!!! Unless you like getting hacked

 

Yes, isn't that obvious to anyone?

 

But if you're developing a test site which is located in you local computer or server, then there will be no problem (as long as you don't forget to switch back :P ).

 

But to extend this message I can also provide an easy and probably the best security measure you can take for your admin part.

 

In ./admin/.htaccess

 

To LOCK ALL ACCESS to your IP-Addess alone, add this:

# deny all except those indicated here
<Limit GET POST PUT>
order deny,allow
deny from all
allow from XX.XX.XX.XX
</Limit>

 

Switch the XX's part for your IP-Adress of course, which you can find e.g. here:

http://www.whatismyip.com/

 

Remember that on some ISP's your IP-Address can change quite often. But then take notice of what the new address are.

 

Many times the first two parts are the same and then you can do this:

 

Say that you usually have:

56.70.34.65

56.70.39.20

56.70.10.10

 

Then you can add 56.70. so the result it:

# deny all except those indicated here
<Limit GET POST PUT>
order deny,allow
deny from all
allow from 56.70.
allow from 90.70.90.90
allow from 22.33.44.22
</Limit>

 

As you also see in the example above, you can add multiple IP-Addresses.

 

This is a security measure everybody should do.

 

// Dr. Rolex

Archived

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

×
×
  • Create New...