“Good morning all! Have a nice day!”

The seven words stopped Lina Shah as she scurried through the subway turnstiles under Times Square on a recent morning, in the thick of rush hour. The words are more typically heard when entering a department store, the automaton drone of a hired greeter. But they seemed so incongruent in the dour tunnels of the New York City subway that Ms. Shah paused in the middle of her commute to find their source.

Then she heard the voice again: “Good morning to you! Have a good day, now!”

There, standing on a busy passageway connecting the Port Authority Bus Terminal with the A, C and E lines was Tonya M. Cooper, a longtime employee of the agency that runs the subways, the Metropolitan Transportation Authority, rattling off good morning salutations at a rate of 32 a minute.

Since November, Ms. Cooper and 40 other transit workers have been shifted into a job that is based largely on the notion that being unrelentingly nice can go a long way to help bolster the image of a flagging, frequently curse-inducing subway system.

“You’re so friendly!” Ms. Shah, an accountant, told Ms. Cooper, after watching her direct a man to the A train, and kneel to tell a little boy, and his mother, which exit to use. “It’s nice to know somebody cares.”