Two Sundays ago in Cooperstown, N.Y., Commissioner Peter Ueberroth vowed to a crowd of 6,000 assembled for the Hall of Fame induction ceremonies that he would take "appropriate action" to prevent a baseball strike.

"We cannot allow these negotiators to fail," he said sternly to fans' cheers and to the applause of 26 Hall of Famers seated behind him. In no uncertain terms, Ueberroth had risked his reputation for leadership gained last year by heading up the Olympic Games organizing committee that turned an unprecedented $215 million profit.

But Tuesday, it appeared that Ueberroth had failed when major league baseball players went out on strike. Yesterday morning, however, he joined negotiations between the owners' and players' representatives for the first time, at 11 a.m. The announcement of a tentative agreement came 75 minutes later from Ueberroth's office.

"I had no role (in the settlement)," Uebberroth said at a news conference last night in New York. "The work was done by these two teams of people . . . They put baseball back on the field."

But by his very presence and the rapid end to the deadlock once he took an active role, Ueberroth scored perhaps his biggest publicity coup since taking over as the game's commissioner in October. Indications were that he steered both sides to an agreement.

"The commissioner did an excellent job of keeping things going," said Lee MacPhail, head of the owners' negotiating committee, at the news conference that made official word of the settlement. "He kept urging us to keep up the bargaining. He kept us at the table. He urged us to keep the rhetoric down. He did everything a person can do."

Ueberroth's action of applying pressure both to management and the players that resulted in the settlement contrasted sharply with the 50-day strike of 1981, in which former commissioner Bowie Kuhn refused to become involved.

Earlier yesterday, on the way into the offices of the players' association, MacPhail hinted Ueberroth was a factor in ending the strike, calling Ueberroth's role "very helpful," but adding, "there's still work to be done."

As Tuesday's strike deadline neared, Ueberroth took the position of the fans' representative in calling for a solution to the contract negotiations. He pointed out that great numbers of people would be affected by a strike.

"This must be the year of records, not the year of the strike," he said at Cooperstown. "I'll make a commitment to baseball fans that I will take all appropriate action to asist both sides in reaching an agreement. We cannot allow these negotiators to fail."

The brief strike was the latest crisis Ueberroth has faced as commissioner. A week after assuming office last October, he persuaded striking umpires to return to work in time for the World Series, getting them to agree to his binding arbitration. He stunned owners by awarding umpires an increase of more than 100 percent in postseason compensation.

This March, Ueberroth gained more publicity when, in a reversal of Kuhn's decision, he reinstated Hall of Famers Mickey Mantle and Willie Mays to baseball while pledging to issue new guidelines for the employment of former players at gambling casinos.

In May, Ueberroth established a plan for mandatory drug testing for baseball teams' personnel and asked the players to take part. Instead, he was criticized by the players association. Recently, he said baseball is "well on the way" to defeating drug abuse among players.

With talks between owners and players halted Monday night, Ueberroth asked MacPhail to call the players association and resume talks. This resulted in intense bargaining by the sides Tuesday before games were called off.

With the quick end to the strike, Ueberroth, 43, appeared on the verge of receiving still more of that positive publicity that began for him last year as president of the Los Angeles Olympic Organizing Committee, a job to which he was appointed in 1979.

The two biggest strokes he and colleagues orchestrated in making the Games such an unexpected financial success were an auction of television rights (ABC bid $225 million) and the creation of the notion of elite sponsorship of the Games by reducing to 30 the number of corporate sponsors, with each paying a minimum of $4 million.

Raised in northern California, Ueberroth graduated from San Jose State with a business degree and began a career in the travel industry. By the age of 23, he had become a small minority owner in Trans International Airlines, owned principally by Los Angeles financier Kirk Kerkorian. Later, Ueberroth became a further success by buying travel companies and small hotels. In the wake of the Olympics, he was named by Time magazine as its "Man of the Year."