Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Password Protect Your Admin Directory


bkellum

Recommended Posts

I am starting this thread to support my contribution "Password Protect Your Admin Directory".

I will post the link to the contribution as soon as I upload it to the osCommerce contribution page.

 

I hope you will find it useful.

 

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

How to Password Protect your Admin Directory in OsC

You will be creating two files (or one new file and modifying your existing .htaccess file if you already have one).


  1.  

Add the following lines at the very end of your catalog/admin/.htaccess file or create a blank .htaccess file using a plain text editor and save it as .htaccess:


  1.  

AuthType Basic

AuthName "OS Commerce Administration"

AuthUserFile " /your/server/path/.htpasswds/catalog/admin/htpasswd"

require valid-user

***Replace "/your/server/path/" with your actual server path that is just outside your web root directory.



Create a folder outside of your web root called .htpasswds (this is most usually a path such as /your/server/path/.htpasswds )


  1.  

Inside this folder, create another folder called catalog/admin/ so that the full path would look something like this: /your/server/path/.htpasswds/catalog/admin/.


  1.  

Then add the following file in the /your/server/path/.htpasswds/catalog/admin/ folder: htpasswd


  1.  

The htpasswd file should include the following one line: username:password

The "username" would be something like "BigBen" or "whatever" and the password would be encrypted. **see below on how to encrypt your password.

Now you need to go to a web site to assist you in creating your .htaccess file and encrypted password. Here are a few you can choose from:



Test your catalog/admin folder for protected access by trying to access your store’s admin folder in a web browser.

 

Have fun,

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I am starting this thread to support my contribution "Password Protect Your Admin Directory".

I will post the link to the contribution as soon as I upload it to the osCommerce contribution page.

 

I hope you will find it useful.

 

Bill Kellum

GraphicSmart / Wayne Strickland

Link to comment
Share on other sites

Thanks, I am looking forward to that link and the Password Protect Information... Wayne Strickland
Wayne, I had to modify the contribution in a way so that it meets the rules of uploading contributions in this forum so that is why the link does not work. I respect the rules so I asked that the contribution be removed. (It was a minor infraction regarding a direct link to my site which led to an online password encryption tool. The links above will give you an option other than just my site) The moderators for osC are great and that is why this forum has the quality of users that it does!

You should be able to get the information that you need in my post above to help you out. Just follow each step and you should be on your way.

Good Luck,

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Wayne, I had to modify the contribution in a way so that it meets the rules of uploading contributions in this forum so that is why the link does not work. I respect the rules so I asked that the contribution be removed. (It was a minor infraction regarding a direct link to my site which led to an online password encryption tool. The links above will give you an option other than just my site) The moderators for osC are great and that is why this forum has the quality of users that it does!

You should be able to get the information that you need in my post above to help you out. Just follow each step and you should be on your way.

Good Luck,

Bill Kellum

GraphicSmart / Wayne Strickland

Link to comment
Share on other sites

Wayne, I had to modify the contribution in a way so that it meets the rules of uploading contributions in this forum so that is why the link does not work. I respect the rules so I asked that the contribution be removed. (It was a minor infraction regarding a direct link to my site which led to an online password encryption tool. The links above will give you an option other than just my site) The moderators for osC are great and that is why this forum has the quality of users that it does!

You should be able to get the information that you need in my post above to help you out. Just follow each step and you should be on your way.

Good Luck,

Bill Kellum

GraphicSmart / Wayne Strickland

Link to comment
Share on other sites

Thanks for the assistance with this... I was trying to follow your instructions and when I went to create the "folder" ".htpasswds" my computer would not create it with the . at the beginning. It will of course create a file that way but not allow me to name a folder with the period or dot a the beginning. Will this work from just a file or do I have to have a folder as you are specifying? Thanks, Wayne Strickland

GraphicSmart / Wayne Strickland

Link to comment
Share on other sites

  • 3 months later...
Thanks for the assistance with this... I was trying to follow your instructions and when I went to create the "folder" ".htpasswds" my computer would not create it with the . at the beginning. It will of course create a file that way but not allow me to name a folder with the period or dot a the beginning. Will this work from just a file or do I have to have a folder as you are specifying? Thanks, Wayne Strickland

 

Your problem is that you are using a Microsoft operating system. Microsoft operating systems do not allow the creation of *NIX hidden files (files that begin with a ".").

 

Change the file name to something else, like "htpasswords" (without the .), and change the path appropriately:

 

/your/server/path/htpasswds/catalog/admin/

 

Alternately, you could host your store on a Linux server that allows ".htaccess" (and you will, if you are going to eventually use a third-party host, as most of them can only manage competitive pricing by using a free OS).

Link to comment
Share on other sites

Your problem is that you are using a Microsoft operating system. Microsoft operating systems do not allow the creation of *NIX hidden files (files that begin with a ".").

 

Change the file name to something else, like "htpasswords" (without the .), and change the path appropriately:

 

/your/server/path/htpasswds/catalog/admin/

 

Alternately, you could host your store on a Linux server that allows ".htaccess" (and you will, if you are going to eventually use a third-party host, as most of them can only manage competitive pricing by using a free OS).

Paul,

It IS possible to create a .htaccess file in a Microsoft OS.

Simply open Note Pad, edit your file, then Save As .htaccess. Works everytime. :thumbsup:

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...