Legislators gave Maryland's transportation secretary a drubbing yesterday for securing big raises for two of his top administrators in the past few months without their permission.

"You just sort of take care of your fair-haired boys the way you want to take care of them," Sen. Julian L. Lapides (D-Baltimore) told Transportation Secretary Richard Trainor during a briefing on transportation issues.

Trainor got the raises by going directly to the Maryland Board of Public Works, which agreed to the increases for Hal Kassoff, the state highway administrator, whose annual salary went from about $62,000 to nearly $73,000, and for Ronald J. Hartman, administrator of the Mass Transit Administration, whose salary rose from $62,400 to about $79,700.

"That is a deliberate attempt to circumvent the legislative process," Lapides said. "That puts us in an untenable position . . . because nobody around here is going to have the guts to knock down salaries they are already getting."

Sen. John Cade (R-Anne Arundel) echoed, "I don't like you going to the Board of Public Works."

Under Maryland law, Cabinet members are allowed to make emergency requests for money to the public works board when the legislature is not in session. Normally, the three-member board, which includes Gov. William Donald Schaefer, disburses money for capital projects.

Yesterday, Trainor told the legislators that he had decided to seek the raises after comparing the salaries of several hundred employees in his department with those of their counterparts in comparable states. The study, he said, found that 100 administrators were underpaid, including a few whose salaries were about one-fourth below the levels elsewhere.

"Our feeling is, when you get to 20 to 25 percent below comparable salaries, some adjustment had to be made in less than a year," Trainor said, explaining why he decided not to include the raises in the next year's budget, which takes effect in July.

But Sen. Charles H. Smelser (D-Carroll) accused Trainor of an unfair analysis. "It looks like you deliberately took systems that pay a high salary," Smelser said.