[arch-general] htaccess password

Genes MailLists lists at sapience.com
Thu Mar 29 22:16:30 EDT 2012


On 03/29/2012 05:16 PM, pete wrote:

> 
> Maybe i should correct that slightly  i need to generate  .htpasswd
> file with 150 user password pairs ..
> 
> Pete .
> 
> 
  If you have a file with usernames then something like this may work
for you.

  ufile=/tmp/xxx
  pfile=/tmp/yyy
  result=/tmp/upfile

  N=$(wc -l $userfile | awk '{print $1}'
  pwgen -C1 -N $N > $pfile
  paste $ufile $pfile > $result

 gene



More information about the arch-general mailing list