摘录于Apache说明文档
htpasswd
is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. If htpasswd
cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes.
Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htpasswd
. This program can only manage usernames and passwords stored in a flat-file. It can encrypt and display password information for use in other types of data stores, though. To use a DBM database see dbmmanage
.
htpasswd
encrypts passwords using either a version of MD5 modified for Apache, or the system's crypt()
routine. Files managed by htpasswd
may contain both types of passwords; some user records may have MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt()
.
This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in httpd
see the Apache manual, which is part of the Apache distribution or can be found at http://httpd.apache.org/.
本文转hackfreer51CTO博客,原文链接:http://blog.51cto.com/pnig0s1992/479550,如需转载请自行联系原作者