When it comes to sharing passwords (with coworkers, significant others, colleagues, group project members, friends, family members, etc) the first and primary piece of advice is simply
DON'T.
However, there are a number of practical and not so practical reasons why passwords are shared (shared work computer, shared account to retrieve data, you need someone to check your account while you are out of town in place with limited-to-no access, your friend really wants to use your Netflix account in exchange for you using their Hulu account, your mom asked really nicely) and there are some ways to mitigate the possible damage that might occur:
Keep in mind when you share your passwords, people can do a lot of potential harm to your accounts including even changing the password to lock you out or change important settings or details that you might not want changed. They may have access to linked accounts, personal files, or personal details that can help to break into other of your accounts. You also have little to no control with whom they share the password, so your group size might be larger than you think (hence #6). And, finally, some accounts/services might flag such sharing as a violation of terms of service so you can find yourself locked out of your favorite Netflix series because other people have decided to rewatch Tiger King for the third time.