No, lockouts are illegal. Landlords that resort to illegal self-help remedies to deny the tenant access to the unit may become liable for damages for a wrongful eviction. If the tenant has been locked out of the unit, the tenant may break the lock to enter. Tenants cannot be prosecuted for breaking into their units. At most, the tenant will be held liable for the cost of the repair to the lock on the door.
However, a tenant may be arrested for breaking or re-entering, if the police have reason to suspect that breaking and entering is occurring. Seek legal advice from an attorney before breaking the lock. The locks may be changed if the Writ of Restitution has been executed by the Sheriff. After the eviction has taken place, the tenant cannot enter the unit without the permission of the landlord.