On a mailing list we have for some school districts in the area someone asked if there was a way to login a bunch of macs in a lab with different usernames and password simultaneously via ARD using something like the 'tell System Events to keystroke' method.
He sent it just a few minutes before I started my lunch break and it sounded intriguing. After a few false starts and a helpful tip via gist comment here it is.
I figured it could be useful if modified to check for even or odd numbered machines and use a test_student or test_teacher account to dee if different policies etc. are being applied.
https://gist.github.com/3954329
#!/bin/bash
computer_name=$(scutil --get ComputerName)
login() {
/usr/bin/osascript << EOF
tell application "System Events"
keystroke "${1}"
keystroke return
delay 1
keystroke "${2}"
keystroke return
end tell
EOF
}
case "${computer_name}" in
lab_imac-01) login user1 "pass1" ;;
lab_imac-02) login user2 "pass2" ;;
*) echo "ERROR: computername not found in case!"; exit 1 ;;
esac