well if your dog is from good lines, and socialized properly , besides being further in tune with you, they'll also be able to determine the good people from the bad if properly socialized. Keep in mind though that some dogs are just friendly with everyone. Shelby would actually run and hide behind me whereas Zena is the one i trust to defend. Riley is all bark with no bite and i'm hoping Shasta turns up to be like Zena. Its a lot to do with the dog personality but if you want (its a type of irresponsible ownership) is to only socialize your dog with people you and your dog are in touch with regularly. Like i said irresponsible ownership. However, if your dog has the right temperment, which would be best, get involved with your local schultzhund club and do training.