httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: htpasswd sets size of passwd file to 0 ?
Date Mon, 07 Jan 2002 08:27:20 GMT
Chris Ringrow wrote:
> I have been running a web site on apache on a Sun SPARC station
> for over a year with no problems etc.
> However now when I try to add a new password using a
> command line like
> htpasswd -b /usr/local/apache/vhosts/ecert/passwords/.htpasswd username
> password
> This has worked fine for over a year, but know, all of a sudden, it
> empties the file .htpasswd ( ls -al shows the size to be 0 )
> which removes all of the other user names and passwords from the file.
> Has anyone seen this behaviour before or is anyone able to shed any
> light on it ?

This shouldn't happen. Are you *sure* that this is the command you are
issuing? Check that you are not using the "-c" switch which creates a
new password file (although even this should not empty the file...).

Test the command in the /tmp directory to see if it works:

$ cd /tmp
$ htpasswd -b -c test.pwd fred flintsone
$ htpasswd -b test.pwd barney rubble
$ more test.pwd

should show two lines


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message