A good scrum master should indeed know Scrum and related agile approaches, but he should also be well aware that these aren't just recipes to apply by the letter.
He should ensure that the concepts are well understood by everyone, agreed upon and respected while it makes sense (e.g., definition of done, retrospectives, ...). For example, if the team isn't always keen to do the stand-up meeting, he should be the one to start singing "Get up, stand up...".
The scrum master should be the first one to notice when a sprint planning meeting or the sprints themselves go wrong and try to find solutions together with his team.
Generally speaking, he should be try to push the team forward and constantly strive to improve its organization and communication (inside & outside of the group).