Skip to content

Disable Tutorial Users

Tom Mitchell edited this page Aug 10, 2016 · 2 revisions

After a tutorial is complete the temporary usernames must be disabled in the clearinghouse. Before disabling users, they should be removed from all projects. The shell for loops below will list member projects, remove members from projects, and disable users.

##Bulk list member projects

for ((i=1; i <= 60 ; i++))
do
  base=nfv15u
  username=`printf "%s%02d" ${base} ${i}`
  echo ${username}
  geni-list-member-projects -k ${GENI_KEY} -c ${GENI_CERTIFICATE} -u https://ch.geni.net -e -m ${username}
done

##Bulk remove members from projects This is intended to be run one project at a time.

for ((i=1; i <= 60 ; i++))
do
  project=NFVSDN15
  base=nfv15u
  username=`printf "%s%02d" ${base} ${i}`
  echo ${username}
  geni-remove-project-member -k ${GENI_KEY} -c ${GENI_CERTIFICATE} -u https://ch.geni.net -m ${username} -p ${project}
done

##Bulk disable members

for ((i=1; i <= 60 ; i++))
do
  base=nfv15u
  username=`printf "%s%02d" ${base} ${i}`
  echo ${username}
  geni-disable-user -k ${GENI_KEY} -c ${GENI_CERTIFICATE} -u https://ch.geni.net -m ${username}
done
Clone this wiki locally