  We consider supersymmetric extensions of the standard model in which the
usual $R$ or matter parity gets replaced by another $R$ or non-$R$ discrete
symmetry that explains the observed longevity of the nucleon and solves the
$\mu$ problem of MSSM. In order to identify suitable symmetries, we develop a
novel method of deriving the maximal $\mathbb{Z}_{N}^{(R)}$ symmetry that
satisfies a given set of constraints. We identify $R$ parity violating (RPV)
and conserving models that are consistent with precision gauge unification and
also comment on their compatibility with a unified gauge symmetry such as the
Pati-Salam group. Finally, we provide a counter-example to the statement found
in the recent literature that the lepton number violating RPV scenarios must
have $\mu$ term and the bilinear $\kappa \, L \, H_u$ operator of comparable
magnitude.
