The gauged B–L symmetry is one of the simplest and well-studied extension of Standard Model. In the conventional case, addition of three singlet right-handed neutrinos each transforming as −1 under the B–L symmetry renders it anomaly-free. It is usually assumed that the B–L symmetry is spontaneously broken by a singlet scalar having two units of B–L charge, resulting in a natural implementation of Majorana seesaw mechanism for neutrinos. However, as we discuss here, there is another simple anomaly-free solution which leads to Dirac or inverse seesaw masses for neutrinos. These new possibilities are explored along with an application to neutrino mixing with S3 flavor symmetry.