Re: htaccess password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 29.03.2012 23:16, schrieb pete:
On Thu, 29 Mar 2012 22:11:31 +0100
pete<p.nikolic1@xxxxxxxxxxxxxx>  wrote:


Hi ..

I need to generate a htaccess file that has 150 username password
pairs  does anyone know of a utility that can do this short of lots of
typing ..


Thanks   Pete .


Maybe i should correct that slightly  i need to generate  .htpasswd
file with 150 user password pairs ..

Pete .


something like this?

#!/bin/sh

while read usr; do
	echo "$usr:$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16)"\
		>> .htpasswd
done < users

In the 'users' file your users are listed (one per line). NOTE: you cant be sure that the passwords are unique

cheers


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux