The lack of experimental evidence for supersymmetry motivates R-parity
violating realizations of the MSSM. Dropping R-parity, alternative symmetries
have to be imposed in order to stabilize the proton. We determine the possible
discrete R and non-R symmetries, which allow for renormalizable R-parity
violating terms in the superpotential and which, at the effective level, are
consistent with the constraints from nucleon decay. Assuming a gauge origin, we
require the symmetry to be discrete gauge anomaly-free, allowing also for
cancellation via the Green Schwarz mechanism. Furthermore, we demand lepton
number violating neutrino mass terms either at the renormalizable or
non-renormalizable level. In order to solve the mu problem, the discrete Z_N or
Z_N^R symmetries have to forbid any bilinear superpotential operator at tree
level. In the case of renormalizable baryon number violation the smallest
possible symmetry satisfying all conditions is a unique hexality Z_6^R. In the
case of renormalizable lepton number violation the smallest symmetries are two
hexalities, one Z_6 and one Z_6^R.Comment: 25 pages, version to appear in PR