How does Latin distinguish between "You must not do this" and "You do not have to do this"?
The former is well covered by the text book's I've used (use oportet, debere, gerundive).
The only example of the latter I've seen is this, from Domus Anguli Puensis:
Vento iam a tergo, clamare non oportuit.
The wind was behind them now, so they didn't have to shout.
In this case the sense "must not" obviously would ...