Cpanel create test accounts: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
Created page with " read -p "Number of accounts to create?" numACCts; read -p "Password to use on all accounts?" acctPaSsWd; CHARS=( q a z w s x e d c r f v t g b y h n u j m i k o l p ); MO..."
 
No edit summary
Line 2: Line 2:




 
<pre style="white-space: pre-wrap;">
read -p "Number of accounts to create?" numACCts; read -p "Password to use on all accounts?" acctPaSsWd; CHARS=( q a z w s x e d c r f v t g b y h n u j m i k o l p ); MODNUM=${#CHARS[*]}; acctcount=0; for i in `eval echo {1..$numACCts}`; do(( acctcount=acctcount+1 )); USRSTR=""; USRLEN=0; for q in {0..7}; do INDEX=$(($RANDOM%$MODNUM)); USRSTR="${USRSTR}${CHARS[$INDEX]}"; done; yes | /scripts/createacct ${USRSTR}.iter $USRSTR $acctPaSsWd > /dev/null 2>&1; echo -ne ${CYAN}"Creating your test accounts:" ${LYELLOW}"$acctcount/$numACCts\033[0K\r"${RESTORE}; done; echo
read -p "Number of accounts to create?" numACCts; read -p "Password to use on all accounts?" acctPaSsWd; CHARS=( q a z w s x e d c r f v t g b y h n u j m i k o l p ); MODNUM=${#CHARS[*]}; acctcount=0; for i in `eval echo {1..$numACCts}`; do(( acctcount=acctcount+1 )); USRSTR=""; USRLEN=0; for q in {0..7}; do INDEX=$(($RANDOM%$MODNUM)); USRSTR="${USRSTR}${CHARS[$INDEX]}"; done; yes | /scripts/createacct ${USRSTR}.iter $USRSTR $acctPaSsWd > /dev/null 2>&1; echo -ne ${CYAN}"Creating your test accounts:" ${LYELLOW}"$acctcount/$numACCts\033[0K\r"${RESTORE}; done; echo
</pre>

Revision as of 01:04, 15 June 2018


read -p "Number of accounts to create?" numACCts; read -p "Password to use on all accounts?" acctPaSsWd; CHARS=( q a z w s x e d c r f v t g b y h n u j m i k o l p ); MODNUM=${#CHARS[*]}; acctcount=0; for i in `eval echo {1..$numACCts}`; do(( acctcount=acctcount+1 )); USRSTR=""; USRLEN=0; for q in {0..7}; do INDEX=$(($RANDOM%$MODNUM)); USRSTR="${USRSTR}${CHARS[$INDEX]}"; done; yes | /scripts/createacct ${USRSTR}.iter $USRSTR $acctPaSsWd > /dev/null 2>&1; echo -ne ${CYAN}"Creating your test accounts:" ${LYELLOW}"$acctcount/$numACCts\033[0K\r"${RESTORE}; done; echo