1

I have wamp server installed on windows OS my .htpasswd looks like

username:encryptedpassword
john:gugyjfy6786hgfhfh

but the problem is to make-up encrypted password is never possible by hand so can i create it in text/plain format

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
  • 1
    possible duplicate of [how to makeup username:password pair in .htpasswd file on wamp server installed on windows OS](http://stackoverflow.com/questions/24630517/how-to-makeup-usernamepassword-pair-in-htpasswd-file-on-wamp-server-installed) – Anshuman Singh Sep 16 '14 at 13:27

2 Answers2

0

Apache provides a command line tool for this. Search for htpasswd file in the bin directory. Passing --help parameter gives you:

Usage:
  htpasswd [-cimBdpsDv] [-C cost] passwordfile username
  htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password

  htpasswd -n[imBdps] [-C cost] username
  htpasswd -nb[mBdps] [-C cost] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -b  Use the password from the command line rather than prompting for it.
 -i  Read password from stdin without verification (for script usage).
 -m  Force MD5 encryption of the password (default).
 -B  Force bcrypt encryption of the password (very secure).
 -C  Set the computing time used for the bcrypt algorithm
     (higher is more secure but slower, default: 5, valid: 4 to 31).
 -d  Force CRYPT encryption of the password (8 chars max, insecure).
 -s  Force SHA encryption of the password (insecure).
 -p  Do not encrypt the password (plaintext, insecure).
 -D  Delete the specified user.
 -v  Verify password for the specified user.
On other systems than Windows and NetWare the '-p' flag will probably not work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

From what I understand, you'd need to execute the command as follows:

htpasswd -bp john

When you press enter after the above command, it'll ask you to type a password which will be stored as text in the htpasswd file.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
-1

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