
Chances are he's doing it because he's insecure with strangers. Don't try to tell him off as that will make it worse. Instead work with him, rewarding when he's quiet. See a person at a distance and BEFORE he has started barking, praise and give a food reward. It does take a bit of work but means he will learn spotting strangers means something NICE happens.