In general, no — not automatically. As part of the process for getting the new partner or shareholder involved, they should sign a document confirming that they agree to the original agreement’s terms.
This may also be an opportunity to review your partnership or shareholder agreement. You should check that its terms still reflect your wishes and how the business has changed since the agreement was first drawn up.