WASHINGTON — President Obama, just back from a surprise visit to the troops in Afghanistan, honored America’s fallen warriors in a solemn Memorial Day ceremony on Monday and acknowledged the need to confront the widening scandal at the nation’s veterans hospitals.

“As we’ve been reminded in recent days, we must do more to keep faith with our veterans and their families to make sure they get the care and benefits and opportunities that they’ve earned and that they deserve,” Mr. Obama said to a military audience gathered under balmy sunshine in an amphitheater at Arlington National Cemetery.

“These Americans have done their duty,” the president said, as the crowd broke out in applause. “They ask nothing more than that our country does ours, now and for decades to come.”