A barking dog is not necessarily a bad thing. Many people choose dogs as pets because they do bark.
A dog's barking can scare off a potential burglar or alert you to a stranger on your property.
However, there may be other times when you wish your dog would stop barking.
If you have visitors and your dog will not stop barking at them, your guests may be frightened, uncomfortable or at the very least, annoyed.
Fortunately, you can teach your dog to stop inappropriate barking.
Enroll in an obedience training course for you and your dog. This will help you learn the proper, healthy way to train your dog so that he obeys your commands. He will learn that you are the "pack leader" and feel more confident in you, alleviating much of his anxiety.
Realize that your dog is probably barking at people out of fear. Find safe ways to expose your dog to a variety of different, unfamiliar people. Take him for a walk at least once a day, preferably in an area with lots of people such as a park. At first, keep him at a comfortable distance from other people. Every day, walk a bit closer to other people to desensitize him.
Train your dog to bark on command. While this might sound counterintuitive, it can actually help you train him to stop on command as well. Teach your dog the "Speak" command using positive reinforcement such as treats, petting and lots of "Good dog!" Once he will "Speak," command him to bark repetitively. After several moments of barking, tell your dog "Enough." When he stops, reward him with a treat. Continue training your dog the "Enough" command, and soon he will know to stop barking when ordered.
Instruct your dog to do something instead of barking. If your dog starts barking at people, tell him to lie down and stay. Since you are showing him that you are in control of the situation, he will follow your instructions and feel less threatened by or nervous around the people in your home.
Crate train your dog. Once your dog is crate trained, you can send him to his crate before people come to visit or after he has started barking at people. While this might sound cruel to you initially, dogs actually feel safe in a crate once they have been trained to use one. It is much like the den of their wild ancestors, and it will give him a deep level of security.
Other information: http://www.peteducation.com/article....2+1551&aid=153