Landlord gives tenant grief over lock change

How far can one legally go to ensure personal safety?