Facebook employees and investors are set to cash in when the world’s largest social network goes public later this month, but life at a public company isn’t always easy.

Just ask the executives at Nokia and Yahoo.

In Nokia’s case, angry investors believe that Nokia executives, including the company’s CEO and CFO, made statements about the company’s attempted turnaround and the prospects for the Lumia phone that were “materially false and misleading” in an effort to “to deceive the market.” In a class action lawsuit, they’re alleging that the troubled mobile phone maker violated securities laws and committed fraud.

Yahoo is facing a similarly serious situation involving its new CEO, Scott Thompson, who it appears may have lied about his educational background. That has led activist shareholder Dan Loeb to call on Yahoo’s board to demand Thompson’s resignation from his post by noon on Monday. If the board does not act, he says, his investment firm will “consider it grounds for further action.” In other words, get rid of Thompson or get sued.

While it would be premature to try to judge the veracity of the claims being made in both cases, the woes of Nokia and Yahoo serve as a reminder that being a publicly traded company is not always an attractive proposition. Yes, there are benefits to going public, and for private companies the size of, say, Facebook, it’s all but required. But that doesn’t mean that going public is good for business.

Just ask Groupon. Going public didn’t change the fact that the long-term viability of the company’s business model was in question, but thanks to serious accounting missteps, the company is already having to deal with shareholder lawsuits that will ultimately distract it from making the changes it needs to make to prove that it’s a company built to last.

Entrepreneurs — even those who haven’t yet started a business — should take heed. With crowdfunding coming, those hoping to build the next big thing will effectively be able to conduct their own ‘mini’ IPOs to raise capital from members of the general public. But in doing so, they’ll also subject themselves to the same types of lawsuits that Nokia and Yahoo are facing. The difference, of course, is that Nokia and Yahoo will likely survive their clashes with shareholders. Conceivably, smaller, younger companies, including some of the newest publicly-traded tech companies, may not.