Cpanel create test accounts: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Use this to create several cpanel test accounts at once.


 
Answer the questions and go!


<pre style="white-space: pre-wrap;">
<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>
</pre>

Revision as of 01:05, 15 June 2018

Use this to create several cpanel test accounts at once.

Answer the questions and go!

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