The Daily ItemLYNN – In an Internet chat room reserved for corrections officers, Scott Thompson identified himself as “The Bad Lieutenant” and often signed his postings as “Only the Shadow Knows.”These high-tech tags were responsible in part for his undoing as the 41-year-old Lynn man pleaded guilty Friday to criminal harassment and making racist threats against Essex County Sheriff Frank Cousins, his former boss.District Court Judge Domenic Paratore sentenced Thompson, who lives at 57 Base Road, to two years in the house of correction, suspended, with three years supervised probation. Thompson also received two additional six-month jail terms for making threats against Cousins, the latter sentences suspended but to run concurrently with the probation. The defendant was ordered to complete 300 hours of community service under the watchful eyes of the Anti-Defamation League and to stay away from the sheriff and his family.According to Essex County Assistant District Attorney Maureen Leal, an Internet expert helped State Police investigators track down Thompson’s on-line misdeeds. From approximately July 2004 to September 2005, Thompson admittedly harassed the sheriff while working as a guard at the Middleton Jail.Thompson previously had been suspended in 1997 for failing to follow a sheriff’s directive. Shortly thereafter, he revived a racist email originally disseminated by Kevin O’Leary, another former jail guard, which showed the crosshairs of a rifle superimposed over the sheriff’s face. Beneath the image was the inscription: “Pull the trigger on the (expletive).”Several on-line diatribes followed, in which Thompson would fire racial epithets at Cousins. Of the bulls-eye image, he wrote, “Does anyone wish it really happened?”In August 2005, Thompson posted a 12-page suicide tutorial, listing dozens of ways such as drowning, poisoning, starving. He urged “Frank” to pick one and signed the posting as “Only the Shadow Knows.”Another posting that month was focused on how to barbecue a dead body, complete with a sauce recipe. During that timeframe, Thompson described himself to the others in the on-line chat room as the “sickest” of all.When Cousins won re-election to office, Thompson suggested that James Earl Ray could help ? a reference to the assassin who killed black leader Martin Luther King Jr.Attorney Charles Blaisdell represented Thompson and urged the court to accept the prosecution’s sentencing recommendations. Paratore agreed, but additionally ordered Thompson, whose wife is a Lynn police officer, to undergo a mental health evaluation.”The hatred you heard here today was racially motivated,” Cousins said after the hearing was adjourned. “Once you get past the management issues, it’s clear this was about skin color. It has been 10 years and I’m glad it’s over.”A complaint filed against Thompson by the Massachusetts Commission Against Discrimination is still pending.