Wells Fargo & Co. customers who didn't consent to having 3.5 million accounts created by bankers trying to hit sales quotas are finally getting what a judge called "rough justice."

U.S. District Judge Vince Chhabria agreed Wednesday to issue final approval for a $142 million class-action accord that will pay an average of $35 for account holders at the center of the company's worst scandal in modern history.

At a hearing, the San Francisco judge told attorneys who objected to the settlement that it has flaws, but said it's better than pressing forward with trial or proceeding with lots of individual lawsuits.