Gene Roddenberry should have named his characters after his friend, bit only of the friend had consented. IT really depends on the story. Associating a name with a character could be good or bad. Is the character one to be revered or reviled? I can't imagine the friend would want to be associated with a bad character.
So apparently Gene Roddenberry has devised the names for two of his characters in hopes that a friend he met during World War II would recognize the names and that would spark the friend to contact him. While this could be viewed as a bit odd, I find no reason why he should not have done it.
I don't see much wrong with naming characters after friends, as long as people know the difference between fictional characters and real people. All kinds of artists and authors draw from the people they know in creating fictional characters, and even the names chosen often reflect names encountered in the real world.
Many writers have a person in mind when they create characters for the worlds of their imagination, but that doesn't always mean that they should name their character after that person. Legally, it could be seen as an invasion of privacy for that individual and morally, it could cast that person in a bad light. Lord knows that the paparazzi would have a field day with it, should the imaginary world make it big in the entertainment industry!