TPR: As a Captain of the Guard you can give just an order to release him... but it's a hard way and can be blocked for you if you did something "wrong" for your career... ;-)
http://fallout.wikia.com/wiki/Captain_of_the_Guard Not always an option, becoming a captain in Vault City is quite tricky.
It's one of the obscure achievements the developers added to the game.
It's so obscure most players will never find about it, on their own. Kind of like naming your character to have the name of the protagonist of a tv series about a vampire killer, and talking to a specific NPC to receive something.
It's complicated, but if you are still determined to do it, I recommend reading Per's guide :
http://fallout.wikia.com/wiki/The_Nearly_Ultimate_Fallout_2_Guide Before you even read the guide, you'll need to have 8 points in charisma (it doesn't matter if you use drugs to reach that amount of charisma, as long as you have 8 or more when you talk with Lynette) and a good amount of speech skill (the guide mentions 75%), and also be a citizen of VC (buying the fake citizen papers doesn't count).
Also, depending of the type of character you're playing, you won't be able to be a captain, because otherwise you'll piss certain factions. If you want to be part of Bishop family, or ally of Raiders (and continue to be), for example. Or want to get certain endings.
I remember a New Reno quest that can ruin completely your chances of ever being promoted to captain, unless you know what you're doing and do it in the right order.
The possible upsides of doing this obscure 'quest' are so underwhelming that it's not worth the trouble, in my humble opinion. You get access to some items in containers inside some buildings, but at this point in the game these items are nothing that will make your jaw fall, they're meh. I wouldn't bother doing all that (check link above) just to release Josh.