1

I am using Windows 8.1 OS and I installed Wamp server ...i google and found that " it should very rarely be edited by hand. There is a special program on a *nix machine that is designed to manipulate the .htpasswd file on your behalf. "

so my question is how to Make-up username:password pair on my windows machine because I cant use that *nix on my window

my .htpasswd looks like

username:encryptedpassword
john:odn927jw3h!hcj

but to make-up encrypted password is never possible by hand so how to make password in text/plain format

Anshuman Singh
  • 1,134
  • 1
  • 13
  • 21

2 Answers2

1

now I got alternate solution

step 1- go to encrypted password generator

step 2-copy that generated encrypted password from website

step 3-create .htpasswd file in root folder under your domain

step 4-write here your username:encypted password pair

/*for eg- john:paste your encrypted password here (after colon) 
john:djfj223dv98vufhhy */
Anshuman Singh
  • 1,134
  • 1
  • 13
  • 21
  • This worked for me. https://hostingcanada.org/password-protection/ Windows path is c:\path\.htpasswd – mrmut Feb 25 '21 at 08:35
0

There is a htpasswd.exe tool in the \wamp\bin\apache\apache2.4.9\bin directory.

And here is the documentation

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • But how to use it? The documentation says to run "htpasswd -c /home/doe/public_html/.htpasswd jane" but this command showes me "htpasswd command not found" – prk_001 Oct 01 '19 at 09:25
  • It is part of the apache install, find where your OS puts it – RiggsFolly Oct 01 '19 at 09:34
  • So for all others who are not familiar with the command line, you have to put "start htpasswd.exe -cb .htpasswd user password", without "start" it doesn't work, this is nowhere mentioned... – prk_001 Oct 01 '19 at 09:50
  • On what OS do you have to do this? I dont on Windows – RiggsFolly Oct 01 '19 at 09:51
  • Also see the documentation link provided above. And be careful with the `-c` option. Read what it does, it will truncate the `.htpasswd` file so should ONLY be used on the FIRST call to `htpasswd.exe` to create the `.htpasswd` file on first use – RiggsFolly Oct 01 '19 at 10:00