Over the course of 10 months in eastern Afghanistan, an Army specialist nicknamed Mud Puppy maintained a blog irreverently chronicling life at the front, from the terror of roadside bombs to the tyrannies of master sergeants.

Often funny and always profane, the blog, Embrace the Suck (military slang for making the best of a bad situation), flies under the Army’s radar. Not officially approved, it is hidden behind a password-protected wall because the reservist does not want his superiors censoring it.

“Some officer would be reviewing all my writing,” the 31-year-old soldier, who insisted that his name not be used, said in an e-mail message. “And sooner or later he would find something to nail me with.”

There are two sides to the military’s foray into the freewheeling world of the interactive Web. At the highest echelons of the Pentagon, civilian officials and four-star generals are newly hailing the power of social networking to make members of the American military more empathetic, entice recruits and shape public opinion on the war.