Awkwardy spying students (and their terminals)

A long time ago, I was working at the local university as a lecturer and system administrator. So far, so good, the teacher I was assisting was a little paranoid about interactive exam sessions: she wanted to constantly and continously spy what each student was doing on the laboratory computer while the exam was going on.

There were two reasons for this:
  • a good reason, like warning the student about the fact that he has not yet saved his file(s) and therefore could loose his work (yes, we often got low on power and had all the computers rebooted);
  • a bad reason, like understand what the student was seeing in the hope to understand if he was copying the homework from another student.
Consider that the exam were done on Linux interactive PCs in console mode only (to prevent students to surf the web, assuming they cannot use stuff like links or Emacs www-mode or stuff like that).

Being young, unexperienced and full of good-will, I developed a small set of shell scripts to monitor student activities. The result was a ugly mess of find, grep, awk and a lot of pipes to check if every student has the required files saved in their home directory. But the problem of inspecting what the student had seen remained until I found a tool name script(1).

Long story short: script(1) starts a new session on the terminal and carefully records everything is displayed on the console itself, storing it within a transcript text file. The professor was enthusiast about the solution I found, but I knew it could not work seamlessy since script(1) stores escape sequences in plain text. That made the effective usage of this tool a mess when the student was so skilled to run something with escape sequences or ncurses stuff.

In any case, the thing was working, and students were warned about this spying mechanism (I insisted to be honest on this), and in the case there was the suspect a student has copied, we could inspect the session log to see if he opened ssh, copied files or so on. I don’t remember a single time we needed the session log (luckily!).

Quite frankly, I thougth students able to do ssh or share files within a terminal session should have been promoted for their skills, not rejected, but that’s was not my task!

The article Awkwardy spying students (and their terminals) has been posted by Luca Ferrari on February 27, 2019

Tags: linux