Validate user sudo rules before applying them

Without this you can potentially add a sudo rule which then means you can't
sudo from *any* user and thus can't sudo to fix the problem.