I have a lease with a tenant who allowed someone to stay for a few weeks while he searched for a place to live. When it came time for the visitor to move on, he refused. I want the original tenant to stay and so does the original tenant, but I want the guest out. Do I have the legal right to change the locks on the doors to allow access only to the original tenant and not the visitor?
Hopefully, you haven't accepted rent from this guest or in any other way indicated that you accepted him as another tenant. If so, your tenant's guest -- ungrateful soul that he is -- is nothing but an unauthorized occupant. The fact that your tenant allowed a guest to stay for a while does not turn that guest into a cotenant.
An unauthorized occupant is, theoretically, nothing other than a trespasser, and your state has ways to get rid of those -- beginning with a call to your local police. There should be no reason, legally, why you and your tenant can't change the locks to keep out a trespasser.
However, while the law is on your side, there are limits to whether you can safely take it into your own hands. The problem is, many long-term guests will claim that, in fact, they have been treated like a tenant and therefore have the rights that tenants do. And freedom from illegal evictions (including by means of lock changing) is a significant tenant right.
So, unfortunately, the wisest course would be to not change the locks or take any other steps that will force or tend to force this guest from the property. You could get into big legal trouble if this guest, left out in the cold, goes to an attorney with the tale of being a real tenant who was locked out. What you should do, annoying as it is, is file an eviction action against this interloper. For more information, see How Evictions Work: Rules for Landlords and Property Managers.