Thousands of Iranians paraded through rain and snow past the occupied U.S. Embassy in Tehran yesterday and President Abol Hassan Bani-Sadr told them from atop the embassy compound wall that they must stay united in the face of potential foreign threats.

Earlier, Bani-Sadr, in an interview with a Hong Kong newspaper, praised the militants holding the U.S. hostages as "young patriots" and took a generally tough line against the United States as a United Nations commission heard testimony from Iranian jurists about alleged human rights violations during the rule of the deposed shah.

But Bani-Sadr asserted his authority over the militants, warning that "they must respect the lawful authorities in the country. They cannot do things independently."

In separate statements throughout the day, officials in Tehran, at the United Nations and in Washington all counseled patience and insisted that efforts to free the estimated 50 American hostages held since Nov. 4 are "on the track."

Some confusion remained over Ayatollah Ruhollah Khomeini's weekend statement that the hostages' release would have to be decided by Iran's new parliament, a move that would delay their release until at least April since that is when the parliament is to be elected.

But sources close to the Revolutionary Council, which rules Iran, stressed in private comments what they saw as the positive elements of both Khomeini's broadcast and President Carter's response Sunday. They took special note of Carter's insistence on good will.

These sources in Tehran offered these interpretations:

Khomeini's statement, for the first time, established a calendar for release of the hostages.

Also for the first time, Khomeini, the country's most powerful figure, unmistakeably took the fate of the hostages out of the militants' hands, and, in his announcement that parliament would decide on their release, dropped his earlier threat that some and possibly all of the hostages would be put on trial.

It was the first time Khomeini separated demands for the return of deposed shah Mohammad Reza Pahlavi from prospects for releasing the hostages.

Other analysts in Tehran suggested that the statements by Khomeini, Bani-Sadr and Carter all point to a step-by-step approach for the negotiations to free the hostages and they suggested that any future American step would be reciprocated by Iran.

As these views were being offered in Tehran, officials in Washington expressed hope that some way could be found to move the process forward while waiting for the April parliamentary elections.

One possibility, it was suggested, could be turning the hostages over to a third party for safekeeping at the end of the U.N. commission's work.

In his interview published in the Hong Kong Star yesterday, Bani-Sadr accused the United States of "naivete" in its assessment of political developments in Iran in recent months.

The United States, he said "attributed the seizure of the hostages to what they described as 'fanatical' Iranians. They then interpreted my election as a victory for a 'moderate' against the clergy.

"They are wrong on both counts," Bani-Sadr continued in the interview, as reported by Associated Press. "They must understand that the students' action and my election constitute two faces of the same coin, namely the Iranian people's wish for independence and an end to U.S. domination. I am amazed at the naivete of the American authorities."

He called the captors of the U.S. Embassy "young patriots whose sincerity and revolutionary sentiments are above all suspicion" and said his government would "never resort to violence" against them, but he warned that they must respect the government's authority.

Earlier Bani-Sadr had denounced the captors as "children" who constituted a dictorial "government within a government."

The march by Iranians past the U.S. Embassy yesterday, in numbers far below the hundreds of thousands predicted, was part of Iran's "Mobilzation Week" observance, Associated Press reported.

Tehran Radio quoted the government Pars news agency as saying blackout practice will be held as part of mobilization week to help the public prepare for a possible war, United Press International reported.

The five-man U.N. commission, which arrived in Tehran three days ago in an effort to resolve the crisis between Iran and the United States, heard five prominent Iranian jurists and human rights campaigners yesterday, Reuter reported a commission spokesman as saying.

Abdol Karim Lahiji, president of Iran's Human Rights Association, who was jailed in the 1960s for political activities, said his report, expected to be ready in two days, would detail American patronage of the shah's government and the U.S. military and economic presence in Iran under his rule, Reuter said.

Today the panel is expected to hear from victims of SAVAK, the shah's secret police.

At the United Nations yesterday, a spokesman said Secretary General Kurt Waldheim is confident that the commission's efforts will lead to a solution of the crisis.