The Maremma sheepdog has spent a long history being friend to both sheep and man, and loyal to a fault. It thinks that this entitles it to the respect of us humans, and it's probably right. The problem is not so much that the Maremma Sheepdog is obstinate or willful; it is that it knows its own worth. It is a very self-assured dog. It is highly intelligent and used to making the decisions that have saved the lives of a flock and sometimes its owner. So, it really doesn't take kindly to having someone tell it what to do when it just doesn't get the reason why it should obey.
Obviously, every dog is different in temperament. There are newer pups being bred from the Maremma Sheepdog that are smaller in stature and somewhat more obedient. However, the main breed is known for its independence and its quick thinking. It has a spot in a rancher's home but it probably won't be happy as simply a guard dog for an empty backyard. It wants to be a part of the family or herd unit, and it wants to be the dominant member.
This means that in order to get it to behave you have to find ways to engender some mutual respect. You can get it obedience training, but that doesn't mean the dog will obey every command. It is extremely protective of your territory and any charge it considers to be guarding. So, if you want a submissive dog, this is not the breed for you. The best you can hope for in this breed is an understanding of equals.
This is probably not as hard as it sounds since the dog is very affectionate. It will bond with its owner and its family and as long as it is treated fairly and is used in some role-fulfilling capacity, it can be a very happy member of your family. It is happiest, however, having a large area to roam and bit of livestock to guard. The thing to remember is that this dog will not be disrespected. If you abuse it or beat it, it is very likely to turn on you and bite you.
If you can't ensure that the dog will behave, which you really can't with a Maremma, then you should take precautions to isolate it when strangers come calling. You should also not allow it in the house when other neighboring children are around as any horseplay may be misinterpreted by the dog as a threat to your children. Be consistent and fair when training it. Don't expect it to be submissive, but try a way to get the dog to be more eager to please.