Legally landlords are not allowed to change locks. It could sometimes be very difficult to evict a tenant if a landlord practices such behaviors. It is always advised to follow the due procedure for eviction.