Welcome to the forums and thanks for being here. I'm sorry that you're struggling with anxiety, this is definitely something I can relate to as well. A big credit to you for being here though, and hopefully we can help you get through that first hurdle.
Can I ask what is it you're afraid of when you ask someone their name? Is it how they'll respond, or the idea you might get too panicky? Sometimes knowing what's holding you back can help, so that you can know that you can face whatever the worst case scenario will be.
I don't know why and you can't dismiss it if you like but I just remembered that quote from The Zoo (it's a movie) - he says "You know, sometimes all you need is twenty seconds of insane courage. Just literally twenty seconds of just embarrassing bravery. And I promise you, something great will come of it." Perhaps you could cut that down to ten - perhaps you could work on smiles as you walk by, or general 'hi's' in the hall, or perhaps it could be the 'my name is x, what's yours?'.
You know either way something great will come out of it, and it sounds like knowing their name really is the hardest part, so I know you can do it.
Hope this helps,