I agree he was probably wrong to withhold the passwords. Unethical.
But what I don't understand is why he just didn't say, "sure, the password is pRisonLove69. What? It didn't work? Well that's what I set it as..."
Could they then jail him for faulty memory?