Cosmological constraints on grand-unified theories with spontaneous lepton number violation are analyzed. We concentrate on SO(10), the simplest of the models possessing this property. It has been noted previously that the consistency of these models with the observed baryon asymmetry generically implies strict upper bounds on the light neutrino masses. In this paper, we analyze the situation in detail. We find that minimal models of fermion masses face difficulties, but that it is possible for these models to generate an adequate baryon asymmetry via nonequilibrium lepton-number-violating processes when the right-handed neutrino masses are near their maximum possible values. This condition uniquely picks out the minimal gauge symmetry-breaking scheme. A nonminimal model is also analyzed, with somewhat different conclusions due to the nature of the imposed symmetries.