|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
>> $ls -Al what do u need to see?
So I can see the permission and owership for those. >> /var/www/html/..... subdirectory I need to see the URL, not system path. >> 3) System path to .htaccess I need the system path, not the content of your .htaccess (you already provided that previously) >> /var/www/html... Finally you have answered 1 out of 4 of my questions. >> "salt"- is it meaning "seed" the seed of random no. generator??? To encrypt a clear-text password, you can do: #!/usr/bin/perl $clear_text_password = "a"; $encrypt_password = crypt($clear_text_password,ab); print "Content-type: text/plain\n\n"; print "My encrypted-password is: $encrypt_password\n"; In this example, ab is so-called the salt string, and the encrypt password will be abxxB7HlIeckU. Say you use a salt string of cd, the encrypted password of a will no longer be the same, it will be cdYC84ebTUdXU. As you can see, the encrypted password with salt string of ab yields abxxB7HlIeckU, the ab is the 1st two characters of your encrypted password, this obviously not very secure as people will know your salt string immediately. Therefore, salt string doesn't need to be a fixed string. It could even be: #!/usr/bin/perl $clear_text_password = "a"; @char=(A..Z); $random=""; for ($i=2) { $random .= $char[rand($char)]; } $salt = substr($random,0,2); $encrypt_password = crypt($clear_text_password,$salt); print "Content-type: text/plain\n\n"; print "My encrypted-password is: $encrypt_password\n"; So that your salt string is randomly assigned. Yes, the encrypted password is different everytime, but they will work. That said, your system doesn't use the same salt string as mine, You got uFWjvligoOg36 but I would get something different, both they both will work on all UNIX system for clear-text password of a. I really can't troubleshoot your problem if you don't provide more details, or at least answer my 3 other questions correctly. BTW, the two scripts above are ready to run, you just need to change this line $clear_text_password = "a"; and chmod it to appropriate permission. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > .htaccess never matches the password is correct, when password is correct |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|