Raggie keeps on doin' it.
Seriously, depends on the locality. All states (even some subordinate jurisdictions) have specific laws regarding tenant/landlord relationships and liabilities. Generally, these details are specifically spelled out in the lease and all parties are bound by that. If you are on a verbal rental agreement (a dumb thing to do) it would be what a court would decide and that's always based on "he said/I said". The landlord will generally win.
I use the standard Texas Association Of Realtors lease (I'm a licensed broker) which generally gives the landlord the right to enter at "reasonable" times. Notice is not required. If the tenant changes a lock, they must furnish the landlord a key.
Personally, I rarely enter a rented property unless there is good reason to do so. I try to notify the tenant at least 24 hours in advance and will try to accomodate the tenants schedule if I can. If it's an emergency or I can't contact a tenant, I'll knock loudly several times and shout a greeting as I go in the door. If I have to go in without the tenant present, I'll have someone accompany me. I'll also do that if the tenant is a lone female that is not a long time tenant that I know fairly well.
All real estate law is fairly complex and lease law can be very confusing (the lease I use is 14 pages), so consulting an attorney familiar with your state and local laws would be very wise. Most lawyers will give you a quick phone consultation with little or no charge.
Do not pay any attention to your best friends 2nd cousins experience or your bartenders real estate knowledge. And remember, the advice you get on the internet, including mine, is worth what you pay for it.
BTW - Don Shock is correct about the blind deadbolts in Texas. That stems from a tragic incident in my city when keys were stolen from the office of an apartment complex.
Also, I really dislike the term "landlord", but that's what we're stuck with.