Hi,This is a very common problem with dogs. The reason why he is doing it is it smells good to him. Dogs digestive tracks work very fast so feces often carries the smell of the meal it once was. Therefore attracting your dog to it. The first step is to consider what you are feeding your dog, quality dog food is recommended as the dog may be lacking the nutrients he needs and thus he is eating stool to replace that. I higher quality food will help.
There are also a couple of things you can do. Add a small amount of pumpkin to his food to help. Pumpkin tastes great going down........coming out leaves it very unappetizing to dogs. It is also good for his digestive track. While there are some great supplements you can purchase at your pet store the fact is pumpkin works just as well and the cost is less. (Make sure to get canned pumpkin and not pumpkin pie filling).You can also train him out of eating stools by spraying them with bitter apple. This teaches him stools do not taste good. It may take a few weeks but most dogs learn quite quickly that it is nasty. There are other products you can try such as Forbid which can be purchased at your local pet store. If he is eating other dogs stool you may want take him to a obedience training class and teaching him the word OFF will be very helpful in curbing the behavior. Your local pet store offers training for a nominal fee.
Walter
Breeder
Breeder and pet health consultant. Have spent a number of years with dog rescue, training and health