Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 11-07-2005, 08:57 AM
princom's Avatar
princom princom is offline
Baby Croc
 
Join Date: May 2005
Location: Central Florida
Posts: 80
Question Automaticly password protect directories

I know that cpanel has a feature to add/edit users for directories, but is there a file I can minipulate with php so I can set up my own add/edit users page?
__________________
Princom: Central Florida Computer and Web Solutions


More Words of Wisdom to Live By from Homer J. Simpson:
"Kids, you tried your best and you failed miserably. The lesson is, never try." - "Beer. Now there's a temporary solution." - "Internet! Is that thing still around?" - "D'oh!" - "Spider Pig, Spier Pig. Does whatever a Spider Pig does. Can he swing, from a web? No he can't, he's a pig. Look oooouuuutt!!! He is a Spider Pig!!"
Reply With Quote
  #2  
Old 11-07-2005, 12:53 PM
MachineDog MachineDog is offline
Royal Croc
 
Join Date: Jul 2005
Location: Somewhere in the everglades.
Posts: 513
Default Re: Automaticly password protect directories

Should be in the .htpasswd directory under your root home directory somewhere.
__________________

Reply With Quote
  #3  
Old 11-09-2005, 07:33 AM
princom's Avatar
princom princom is offline
Baby Croc
 
Join Date: May 2005
Location: Central Florida
Posts: 80
Default Re: Automaticly password protect directories

Turns out that when you password protect a directory through cpanel it creates an .htaccess file in the directory you password protect which in turn points to a passwd file through the root directory of your server (just outside of public_html) and if that's not enough to work around, although the usernames aren't encrypted the passwords are. I think it will be easier just using a login with a session.

Example of .htaccess file:
-----------------------------------------------------
AuthType Basic
AuthName "Enter Password"
AuthUserFile "/home/princom/.htpasswds/ebay/passwd"

require valid-user
-----------------------------------------------------

Example of passwd file
--------------------
test:tMTnlIEQmU3RY
--------------------

Even if I did find a way to set up my own user management it would be less work just scripting one up myself.
__________________
Princom: Central Florida Computer and Web Solutions


More Words of Wisdom to Live By from Homer J. Simpson:
"Kids, you tried your best and you failed miserably. The lesson is, never try." - "Beer. Now there's a temporary solution." - "Internet! Is that thing still around?" - "D'oh!" - "Spider Pig, Spier Pig. Does whatever a Spider Pig does. Can he swing, from a web? No he can't, he's a pig. Look oooouuuutt!!! He is a Spider Pig!!"
Reply With Quote
  #4  
Old 11-09-2005, 07:45 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Automaticly password protect directories

Quote:
Originally Posted by princom
Even if I did find a way to set up my own user management it would be less work just scripting one up myself.

Actually, scripting a user management isn't that much work using sessions. I found it was much easier than I expected.
Reply With Quote
  #5  
Old 11-09-2005, 12:17 PM
princom's Avatar
princom princom is offline
Baby Croc
 
Join Date: May 2005
Location: Central Florida
Posts: 80
Default Re: Automaticly password protect directories

Quote:
I think it will be easier just using a login with a session.
I know that's what I said.
__________________
Princom: Central Florida Computer and Web Solutions


More Words of Wisdom to Live By from Homer J. Simpson:
"Kids, you tried your best and you failed miserably. The lesson is, never try." - "Beer. Now there's a temporary solution." - "Internet! Is that thing still around?" - "D'oh!" - "Spider Pig, Spier Pig. Does whatever a Spider Pig does. Can he swing, from a web? No he can't, he's a pig. Look oooouuuutt!!! He is a Spider Pig!!"
Reply With Quote
  #6  
Old 11-10-2005, 03:30 AM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: Automaticly password protect directories

LOL, you just quoted yourself. =)
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 03:46 AM.