Originally Posted by Treikayan
grep UserA UserB UserC UserD UserE [...]
That tells grep to search files UserB UserC UserD UserE [...] for string UserA and that ain't never going to do what you want.
You could save a sample lsof output into a file
lsof -ni TCP:21 > my_test.input
and then experiment with grep commands until you get what you want
cat my_test.input | grep <grep options>
Chances are you will need the -E option.
That general technique, of experimenting with command formats at the command line, is a powerful way to establish what can later be programmed into a script.
If you get stuck, ask again and post what you have tried.