htpasswd a big list of user and pass

I got a script running on server , that generating a big file of user and password
in format

   username ="johnuser"  password="johnpass"
   username ="adamuser"  password="adampass"

so on about 500 in list

This file is keep updating every 10 minute , with the list of users added or removed,
I want to use this username and password to protect apache folder using htpasswd , is it possible to do that by any bash script that i can put in cron and can run
to update my user list using htpasswd automatically .


Source: bash

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.