Antonym is opposite. Disobey is to not follow the instructions given to you, so an opposite of this is to listen to the instructions which would be obey.
I think this sentence would be better if we put an additional 'the' before the word 'students' So the sentence will become : it could be dangerous to carelessly teach grammar to the students