开发者

Linux - HTPASSWD file too big? (more than 2000 users)

开发者 https://www.devze.com 2023-03-18 11:20 出处:网络
I got here a quite huge HTPASSWD fi开发者_开发百科le which stores the users and their encrypted passwords. This file is used to authenticate users using HTTP.

I got here a quite huge HTPASSWD fi开发者_开发百科le which stores the users and their encrypted passwords. This file is used to authenticate users using HTTP.

I got more than 2000 entries (users) in this file. The size of that file is 116KB.

Linux - HTPASSWD file too big? (more than 2000 users)

Additionnaly, about 40 new entries are added in this file each day.

So I would like to know if I got a problem with an htpasswd file that big. And what are my alternatives to the htpasswd file? And how can I transfer my users and their encrypted passwords to the new alternative?

SOLUTION

I figured out how to convert my htpasswd file to the DBM format using this perl script: htpasswd2dbm.pl

Here is how to use it:

htpasswd2dbm.pl -htpasswd users usersdbm


There is perfomance issues related to large htpasswd files. However you can use DBM format to improve performance for large password files:

http://httpd.apache.org/docs/2.0/mod/mod_auth_dbm.html#authdbmuserfile

A quick google provided this page which gives a good overview of using DBM files:

http://www.apacheweek.com/features/dbmauth

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号