httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <warp-...@usa.net>
Subject Re: [users@httpd] Creating a password from an excel or text file
Date Thu, 11 Sep 2003 01:17:04 GMT
Please post in plain text to the list.

Apache's htpasswd will not do this, no.  Doing something like this would
require at least a small amount of programming on your part.  At the very
least, dump all the usernames and passwords to a plain text file, one per
line, like this format:

user1 pass1
user2 pass2
user3 pass3

Then use a text editor like TextPad or UltraEdit, which can do REGEX
(Regular Expression patterm matching and replacement), and do a search and
replace for "^(.*)" with "htpasswd .htpasswd \1".  This will replace every
line with the appropriate htpasswd command.  Change the first command to add
the -c flag. Save this to some .bat file (pw-gen.bat).  It should look like
this when done:

htasswd -c .htpasswd user1 pass1
htasswd .htpasswd user2 pass2
htasswd .htpasswd user3 pass3

Then go set up your .htpasswd and .htaccess files accordingly.  (Check
todays archives as I've just explained this in depth).

Leif

----- Original Message ----- 
From: David
To: HTTP Server Users
Sent: Tuesday, September 09, 2003 8:57 PM
Subject: [users@httpd] Creating a password from an excel or text file


Hi!!

I understand to create a user ID and password for the basic authentication
for my web server requires me to enter the each and every user name-password
sets from the command prompts.

Suppose I have some 250 user accounts with different passwords to be
created. How can I do this ?  Can I tell htpasswd.exe  to read the user ID
and password information from the file (say an Excel or just a simple text
file delimited by tabs).

Many thanks for your time and attention.

Warmest Regards
David




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message