Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htpasswd problem

Status
Not open for further replies.

ascikey

Programmer
Feb 18, 2004
127
GB
Hi all,
I am having a problem creating a new password file using htpasswd on XP
I am using the command

htpasswd -c C:/Program Files/Apache Group/Apache2/passwords/dvd/account/pwdFile.pwd tony

is there any line that should be altered in the httpd.conf? I have looked at the tutorial on the Apache site but carn't find anything that I am doing wrong.
When the command is issued I get the suggestions for the use of the command as if I am using it incorrectly but I don’t know why. Can anybody shed some light on this?
thx
 
Unless you badly mistyped the command above, it's probably because you have not specified a valid Windows path for the password file. Try:

htpasswd -c C:[red]\[/red]Program Files[red]\[/red]Apache Group[red]\[/red]Apache2[red]\[/red]passwords[red]\[/red]dvd[red]\[/red]account[red]\[/red]pwdFile.pwd tony
 
thx for ur reply
no that wasnt a typo i thought that is how apache wanted it.
i will give it a go that way and let u know
 
Much of the apache documentation you will find is written for *nix operating systems. So quite often you will see a path something like [blue]/var/www/htdocs/.....[/blue]. But for Windows, paths are written like [blue]C:\Program Files\Apache\.....[/blue] The tip-off is the C: - this is specific to Windows.
 
ok i have tried that but i got the same as before

C:\Program Files\Apache Group\Apache2\bin>htpasswd -c C:\Program Files\Apache Gr
oup\Apache2\passwords\dvd\account\pwdFile.pwd tony
Usage:
htpasswd [-cmdpsD] passwordfile username
htpasswd -b[cmdpsD] passwordfile username password

htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password (default).
-d Force CRYPT encryption of the password.
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
-D Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.

C:\Program Files\Apache Group\Apache2\bin>

any suggestions cos i am stumped
 
I have found the error in my syntax and it was in the directory path that needed speech marks around it, probably apache assumed that after a space it was a username and after next space was an error.
It worked with the backslashes but didn’t try the forward slashes. Thx for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top