Landlords wield an awful lot of power over their tenants—and where there’s power, it’s likely to be abused. We’re not saying all landlords are awful, but some sure can get annoying, or offensive, or leave you in the lurch. To help guide you through these dicey scenarios, here’s a field guide to five types of landlords you might encounter. We’ll show you how to deal with their worst behaviors so you can find a way to live happily under their roof.

1. The MIA landlord

You know that landlord who’s so unreachable, you wonder if he’s a figment of your imagination? Playing hard to get may work great for him, but the truth is that tenants often need to get in touch with landlords for all kinds of issues, many of them urgent.

“All landlords, property managers, and building owners should be providing the tenant with emergency phone numbers,” says Denise Supplee, co-founder of SparkRental.com. But if yours doesn’t—or rarely returns your calls or emails—it may be time to ignore polite decorum and be a squeaky wheel. Call and e-mail daily if you must—annoying, yes, but it will likely get his attention. Or send a certified letter, or, since you have to send a rent check every month, include a letter, pictures, or other evidence that details your problem with that check. If and when the check gets cashed, you’ll know your landlord received your complaints.

You may be tempted to withhold rent, but that’s rarely a good idea. Doing so can damage your rental payment history, credit score, or even give your landlord cause to evict you. In some states, withholding money is a viable option, but you should set that money aside in an account, since should you end up in court and lose, you’ll have to pay it back.

2. The landlord without boundaries

On the opposite end of the spectrum from MIA landlords are those who are around way too much. Your landlord may call at all hours—or worse, drop by unannounced.

“A landlord is not permitted to drop by without notice,” says Supplee. That’s true even if he’s rapping on your door because you’re late on rent! In fact, in most places a landlord is required to give you 24 to 48 hours notice before visiting, and keep those visits between the hours of 9 a.m. and 5 p.m.

So if your landlord’s barging in whenever he wants, you’ll want to politely but firmly make your boundaries clear. Something along the lines of, “I work long hours, so I prefer peace and quiet when I get home” can do the trick without insinuating he’s a creep.

If the problem persists, you might have to draw a harder line. “Write down every date and time a landlord violates your privacy and send him a written request to stop,” says Supplee. “If the behavior continues, you may have to contact an attorney to file suit.”

3. The lazy landlord

Whether it’s a leaky faucet or a collapsed beam, your landlord is responsible for arranging and following through on certain repairs. So if he is dragging his feet, you have a few options.

“There’s a little-known tip called ‘repair and deduct’” explains Supplee. “Each state has its own requirements but, generally speaking, if the tenant gets the repair done, he or she can deduct the receipted amount from the rent.”

Thomas Mark, an attorney who specializes in tenant/landlord disputes, elaborates: “In court, you must show that the landlord knew about the problem and that he failed to repair the problem within a reasonable time.” You can bolster your case with photos of the flaws, documented repair requests, inspection reports from professionals, and even witnesses in your apartment who can testify on your behalf.

4. The subtly discriminating landlord

No one wants to live under a landlord who discriminates based on race, gender, sexual orientation or family status … but the problem is, these biases may be so subtle they might slip past your radar at first. For example, some studies have shown examples of discrimination can manifest in whether landlords show you the laundry room and other facilities when showing you an apartment,or remarks about the neighborhood and whether it’s “right” for you. Once you’ve moved in, it might affect how long it takes them to respond to an e-mail or phone call.

What’s more, “Discrimination doesn’t have to be overt to be illegal,” says Mark. In other words, if a landlord makes you feel uncomfortable or unwelcome, you could have a case. When in doubt, contact the Leadership Conference on Civil and Human Rights to find out about housing discrimination enforcement agencies in your state.

5. The BFF landlord

Being pals with your landlord: What could be better? Don’t get too excited, though, because there’s a reason—several actually—that it’s risky to do business with friends. For example, what toll will a rent hike take on your friendship? And what about repairs? At first, your landlord buddy might rush to fix your problems, but who’s to say he won’t count on you “understanding” that he can’t get to something right away?

Bottom line is even if you’re pals, make sure there’s a rental lease in place outlining expectations in terms of rent, repairs, and other sticky issues. If you care about your friendship—and your home—it’s the best way to avoid messy misunderstandings.