When you talk to the weapons officer, there is one answer that will satisfy him (the rest trigger an attack). The clue is in how he phrases the question...
<span class='standouttext'>Spoiler : </span><span class='spoiler'>He asks something like 'why in the name of chaos did you join the army', and the correct answer is 'chaos lead me'.</span> (highlight the text to read)

In general, you need to have the hero wear the citadel disguise armour dropped by the first guard in the citadel in order for the majority of soldiers to remain friendly. The DK patrols will recognize you regardless and some guards will attack since you don't have proper ID papers, but wearing the disguise most people will just assume you are a new recruit.
After you have completed all the quests in the citadel and learned from any teachers you want to, you can optionally remove the disguise and wipe everyone out before continuing to the next act.