A global cyber attack has revealed the names of students and staff in schools and universities, with authorities scrambling to contact those affected.