How to generate a Linux Apache password file on Windows

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to generate a Linux Apache password file on Windows

Postby Ian Sweeney » 02. April 2012 16:04

My development machine is Windows. I use the htpasswd program that is part of the Windows XAMPP package, version 1.7.7, to generate a Windows Apache password file.

C:\xampp\apache\bin\htpasswd.exe -bc .htpasswd usename password

I need to generate a password file for a Redhat Linux machine but have no access to the htpasswd program on that machine. If I can generate a valid Linux Apache passwd on Windows then I can FTP it over to the Linux system.

The htpasswd documentation says that I can use the -d flag to force crypt() encryption which should work on Linux instead of the default MD5 encryption that works on Windows.

My problem is that

C:\xampp\apache\bin\htpasswd.exe -bcd .htpasswd usename password

generates a file but gives a message which says "Automatically using MD5 format".

How do I generate a valid Apache password file for a Linux machine from a Windows PC?
Ian Sweeney
 
Posts: 3
Joined: 02. April 2012 15:43
Location: London
Operating System: Windows

Re: How to generate a Linux Apache password file on Windows

Postby hackattack142 » 02. April 2012 22:48

http://httpd.apache.org/docs/2.2/programs/htpasswd.html

The Crypt() option is not supported on Windows as the documentation above states.

The MD5 option is the default for this tool and I believe it is a special implementation for Apache. If I am not mistaken, it should be portable across OS's (did you try it?)
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 123 guests