A "show-off" sixth form pupil who hacked into his school computer system and tried to do it again two months later has been been given a community order.
Matthew Higgins, now 20, committed the offences at Eirias High, Colwyn Bay, in March 2011.
Recorder Catherine Brown told Higgins, of Meadowbank, Old Colwyn, he had to "face up" to his crime.
He received a 12 month order with supervision and 120 hours unpaid work.
"Until you face up to what you have done, there must be a risk that you behave in a similar anti-social manner in the future," she said.
She believed that part of his motivation was to "show-off" to those in the computer hacking field, and that there was an element of attention seeking.
The recorder said she was in position to judge about the way the school had responded to the bullying he had suffered at school.
But she was satisfied Higgins had wanted to "get back" at the school and used his computer talents to do so.
"You thought that you would not be caught but you were wrong about that," she told him.
Higgins posed as the parent of a female pupil and asked the teacher in charge of the school computer system for a password to the parental portal, and he had been provided with it.
Data about that school pupil was obtained and placed on a website.
The recorder said that in part she regarded it as a "clumsy and wholly inappropriate" way to get close to a girl he liked and to embarrass the school.
Higgins then tried to do the same thing again and sent an email requesting a password while posing as the mother of another girl.
However, this time the teacher was suspicious and checked with the mother to find that it was false.
The recorder said it was not a victimless crime and it was also a "wake up call" for the school with regards to its computer security.
She added robust steps should be in place to check the identity of those requesting passwords.
The sentence would give the defendant a chance to address the health issues that he plainly had, she said.