HOLIDAY — A middle school student who said he was just trying to play a prank on a teacher he didn't like was charged with a cybercrime Wednesday after authorities said he hacked into his school's secure computer network.

The Pasco County Sheriff's Office has charged Domanik Green, an eighth-grader at Paul R. Smith Middle School, with an offense against a computer system and unauthorized access, a felony. Sheriff Chris Nocco said Thursday that Green logged onto the school's network on March 31 using an administrative-level password without permission. He then changed the background image on a teacher's computer to one showing two men kissing.

One of the computers Green, 14, accessed also had encrypted 2014 FCAT questions stored on it, though the sheriff and Pasco County School District officials said Green did not view or tamper with those files.

"Even though some might say this is just a teenage prank, who knows what this teenager might have done," Nocco said.

But Green, interviewed at home, said students would often log into the administrative account to screen-share with their friends. They'd use the school computers' cameras to see each other, he said.

Green had previously received a three-day suspension for accessing the system inappropriately. Other students also got in trouble at the time, he said. It was a well-known trick, Green said, because the password was easy to remember: a teacher's last name. He said he discovered it by watching the teacher type it in.

Green said that on the morning in question, he accessed the computer that stored the FCAT files and, realizing that computer didn't have a camera, found another.

"So I logged out of that computer and logged into a different one and I logged into a teacher's computer who I didn't like and tried putting inappropriate pictures onto his computer to annoy him," Green said.

The teacher he was targeting was out that day. Instead, the substitute teacher saw the picture and reported it to the school's administration.

The teen's mother, Eileen Foster, said she understands her son did something wrong, but doesn't think he needed to be arrested. Also, she said, it shouldn't have been so easy for students to access the system.

The school district is in the process of changing the network password, district spokeswoman Linda Cobbe said.

The sheriff said Green's case should be a warning to other students: "If information comes back to us and we get evidence (that other kids have done it), they're going to face the same consequences," Nocco said.

Green was released on Wednesday from Land O'Lakes Detention Center into the custody of his mother. He'll likely be granted pretrial intervention by a judge, sheriff's detective Anthony Bossone said.

Green also received a 10-day school suspension. It's unclear if he'll return to Paul R. Smith to complete the school year after the suspension.