After reading some of the posts here on security etc I dedided to start experimenting with htpasswd and .htaccess files. No problem in getting it to run on my (local) development machine. However when I try to get things going on my live server, none of the passwords (I just created so I'm pretty sure they're correct) are accepted.
Two questions:
- could my connection setup (cable internet > router/DHCP server > WiFi base station > server) have something to do with it ?
- I just FTP'd my test environment (including password and group files) to my live environment. The passwords are encrypted using the default htpasswd settings (so no plain text or extra encryption). Could it be that password checking is failing because the passwords were encrypted on a different system ?
Oh and one last (small) thing - does anyone know if there's an easier way to create a .htaccess file on a Windows system (my test environment) than having to copy con it? Explorer and most editors I've used just don't accept a filename starting with a period...
TIA
Regarding htpasswd
Moderator: General Moderators
-
J_Reynders
- Forum Newbie
- Posts: 3
- Joined: Fri Jan 09, 2004 1:54 am
- Location: Antwerp, Belgium
Re: Regarding htpasswd
Editplus, for example, accepts such a filenames easily. Notepad also does (WinXP Pro SP1).J_Reynders wrote:Oh and one last (small) thing - does anyone know if there's an easier way to create a .htaccess file on a Windows system (my test environment) than having to copy con it? Explorer and most editors I've used just don't accept a filename starting with a period...
-
J_Reynders
- Forum Newbie
- Posts: 3
- Joined: Fri Jan 09, 2004 1:54 am
- Location: Antwerp, Belgium
Re: Regarding htpasswd
Though Notepad adds me the fustration of "Gaaahhhh" after seeing it's .htaccess.txt rather than .htaccess sometimes eh? O.oWeirdan wrote: Editplus, for example, accepts such a filenames easily. Notepad also does (WinXP Pro SP1).
-Nay
-
Black Unicorn
- Forum Commoner
- Posts: 48
- Joined: Mon Jun 16, 2003 9:19 am
- Location: United Kingdom
Windows and htaccess
Regarding the password encryption:
If you use Apache, the passwords may be encrypted using STD_DES or MD5. I think more recent versions of are using MD5 ... my Apache (version 1.3) uses STD_DES. It is recommended you use Apache's CLI to make a password. I have no problem using PHP to encrypt working passwords using crypt($password,CRYPT_STD_DES) and saving the result to some password file. On unix, anyway ...
If you want to save a .htaccess file using notepad or word, put it in quotes.
Just click Save As -> ".htaccess" and Windows won't bug you with illegal file names or add .txt extensions. I think this works on most Windows installations.
If you use Apache, the passwords may be encrypted using STD_DES or MD5. I think more recent versions of are using MD5 ... my Apache (version 1.3) uses STD_DES. It is recommended you use Apache's CLI to make a password. I have no problem using PHP to encrypt working passwords using crypt($password,CRYPT_STD_DES) and saving the result to some password file. On unix, anyway ...
If you want to save a .htaccess file using notepad or word, put it in quotes.
Just click Save As -> ".htaccess" and Windows won't bug you with illegal file names or add .txt extensions. I think this works on most Windows installations.
-
J_Reynders
- Forum Newbie
- Posts: 3
- Joined: Fri Jan 09, 2004 1:54 am
- Location: Antwerp, Belgium
Reluctant to say this but boy am I an idiot ... I copied parts of the .htaccess file (the only file not copied from my test environment) and forgot to update the filepath for the groups and password files
so it kept pointing to some other (existing) files (which of course did not include the user/pwd I just created) ...
Anyway thanks a bunch for the replies
Anyway thanks a bunch for the replies