Travelers gripe about having to remove shoes while going through airport security or undergoing full-body pat-downs. But imagine being the Transportation Security Administration screener who has to deal with thousands of grumpy passengers daily or must rummage through strangers' dirty underwear to look for items that could blow up a plane.

It is not surprising that TSA employees rank among the federal workers who are least content with their jobs.

"All the research shows that the more engaged employees are, the more committed they are, the more effective an organization is," said John Palguta, vice president of policy with the Partnership, which ranks hundreds of federal agencies each year in a report entitled "Best Places to Work."

The partnership develops its rankings using employee responses to a survey by the Office of Personnel Management. The 2012 survey of more than 687,000 workers was released last week. The OPM said 80 percent of them enjoyed their work, and more than two-thirds would recommend their agency to others. The partnership's report for 2012 is due out next month.

The report is closely watched by agencies — and byCongress. Repeat appearances by Homeland Securitynear the bottom of the list prompted lawmakers to ask the Government Accountability Office, the investigative arm of Congress, to find out why the department's workers — including TSA employees — were so unhappy.

In a September report to Congress, the GAO said union representatives cited staff shortages, inflexible schedules and temporary assignments that disrupt the balance between work and home life as some causes for low morale at certain Homeland Security agencies. The GAO suggested ways for Homeland Security to improve its efforts to root out the causes of poor morale.

According to the partnership's2011 report, 64 percent of government workers overall had positive responses to a series of questions about their jobs. That's a slight dip from the year before — and a lower satisfaction rate than reported by employees in the private sector.

For federal workers who have had a two-year pay freeze, money is playing a larger role in job satisfaction, Palguta said. But it's not the most important factor.

"The big driver in job satisfaction is leadership," Palguta said.

Leadershipplayed a role in the Federal Deposit Insurance Corp.'s rise to first place last year, up from No. 25 just a few years ago, he said.

During the economic crisis that triggered a rash of bank failures, then-FDIC chairman Sheila Bair doubled down on trying to engage employees, Palguta said. That effort paid off for the banking regulator.

The FDIC also ranked No. 1 in several other measures, including teamwork, pay and effective leadership.

That didn't surprise Martha Solt, a senior economist with the FDIC and president of the National Treasury Employees Union's Chapter 207, which represents 1,200 workers at the agency's headquarters.

"One of the first things that happened, we had top leadership that listened," she said. "They worked with the union on a whole bunch of matters that were causing employee stress and unhappiness."

For example, the union and management negotiated a compensation package that was competitive with that ofthe private sector, she said. And performance evaluations were revised in a way that workers felt was fairer. The agency also created training opportunities and began allowingflexible work schedules, she said.

Solt gives credit to Bair, who left the agency last year. But she added that the union also has a good relationship with Bair's replacement, Martin Gruenberg.

"It doesn't mean that we are perfect," she said. "We have issues that still need to be worked on."

Employees, for instance, would like to be more involved in the early stages of planning at the agency, rather than having their input sought only after decisions have been made, Solt said.

The GAO perennially ranks among the top places to work. It came in third last year.

Ron LaDue Lake, a senior methodologist at the agency and president of Local 1921 of the International Federation of Professional & Technical Engineers at the agency, credits much of the job satisfactionto the work itself: Researching and writing reports that are mandated by law or requested by Congress.

"Other organizations would drool to have the kind of access that we have," he said. "Not that we always get what we think we need."

The environment, he adds, is intellectually stimulating.

"We have very bright colleagues," LaDue Lake said. "That doesn't mean we always agree, but we have very interesting discussions as we go about our work."

The GAO is part of the legislative branch, but has been affected by the pay freeze on the executive side. This has caused some employees to leave, adding stress on those left behind to pick up more of the workload, LaDue Lake said.

Still, morale at the GAO is far higher than at Homeland Security, which ranked 31st of 33 large agencies in job satisfaction.

Homeland Security is made up of many agencies, and worker satisfaction varies among them. Job satisfaction, for instance, is above average at the U.S. Coast Guard, but much lower at the Federal Emergency Management Agency, Immigration and Customs Enforcement and, of course, the TSA.

"It's a tough job," Palguta said of the work of TSA employees. "I go out of my way to be nice to them."