HONOLULU — A female Iraq veteran whose children can use her benefits and whose wife can receive her flag at her funeral.

A man who gave up his dream of joining the military because he was gay, and another who kept his relationship with a man secret so he could serve.

These were among the stories shared on Tuesday when President Obama released letters he had received from gay members of the military thanking the president for repealing the “don’t ask, don’t tell” policy exactly five years ago. Mr. Obama promised in a corresponding Facebook post that he would spend the remainder of his presidency looking for ways to combat discrimination against lesbian, gay, bisexual and transgender Americans.

“I couldn’t be prouder of what we’ve accomplished together,” the president said in the post. “But our work is not finished. From the boardroom to the locker room, L.G.B.T. Americans still face prejudice in their daily lives.”