Sergei Lavrov (left) and John Kerry were both upbeat after the vote, despite differences in the Russian and US positions on Syria. Photo: AP
A UN plan for Syria is a "milestone" in the efforts to end the conflict there, says US Secretary of State John Kerry.
He said the plan gave Syrians a "real choice... between war and peace".
However, disagreements remain over President Assad and the unanimously agreed Security Council resolution makes no mention of his future role.
Western countries have called for his departure, but Russia and China say he should not be required to leave power as a precondition for peace talks.
Mr Kerry said Mr Assad had "lost the ability to unite the country". But he also said that demanding Mr Assad's immediate departure was "prolonging the war".
"We are under no illusions about the obstacles that exist," Mr Kerry said. "There obviously remain sharp differences within the international community, especially about the future of President Assad."
However, while Western and Arab nations accept that Mr Assad can be part of the transition, they insist he must be gone at the end of it.
France's Foreign Minister Laurent Fabius said the idea of Mr Assad standing in elections was "unacceptable".
British Foreign Secretary Philip Hammond said it would be "impossible to bring peace and unity while he remains".
But Syria's UN ambassador Bashar Jaafari said there was a "glaring contradiction" between outside countries talking about letting Syrians decide their future yet also insisting on replacing Mr Assad.
The resolution foresees talks between the Syrian government and opposition in early January.
Russian Foreign Minister Sergei Lavrov said it would be possible to reach an agreement on a unity government for Syria within six months.
The plan sets out a timetable for UN-supervised elections within 18 months, and stresses that the Syrian people will decide the future of their country.
The plan also calls for a ceasefire, but there is also disagreement over which armed groups should be designated as terrorists and consequently excluded from any talks or ceasefire. Actions against groups considered terrorist organisations would not be affected, allowing Russian, French and US air strikes against Islamic State to continue.
The agreement demands that all parties cease attacks against civilians.
The Syrian war, which is heading towards its fifth year, has killed more than 250,000 people and displaced millions more, the UN says.
At the UN: Barbara Plett Usher
The plan is a basic framework - the minimum on which supporters of the government and the opposition could agree.
But the parties who drafted the roadmap believe ending the civil war is the only way to effectively fight Islamic State, which is thriving in Syria's chaos.
They're hoping the UN backing will give momentum to the process and, crucially, some relief to the Syrian people.
UN Security Council Resolution on Syria (No. 2254)
Calls for ceasefire and formal talks on a political transition to start in early January Groups seen as "terrorist", including Islamic State and al-Nusra Front, are excluded
"Offensive and defensive actions" against such groups - a reference to air strikes by US-led coalition and Russia - to continue
UN chief Ban Ki-moon to report by 18 January on how to monitor ceasefire
"Credible, inclusive and non-sectarian governance" to be established within six months
"Free and fair elections" under UN supervision to be held within 18 months Political transition should be Syrian-led
Analysis: Lyse Doucet, Chief International Correspondent
A stubborn gridlock in the UN Security Council has long blocked any step towards a political resolution of Syria's devastating war.
For years, everyone insisted there was no military solution. Nobody made much effort to achieve it.
The UN's first envoy Kofi Annan bitterly blamed the world body when he quit in 2012 after only one year in the job. His successor Lakhdar Brahimi frequently beseeched the Council to do more and often apologised to the Syrian people for failing them.
Now UN Envoy Staffan de Mistura is tasked with organising Syria talks. This unanimous vote is a crucial step forward. But the goal of "credible, inclusive and non-sectarian governance" within six months is hugely ambitious.
President Assad's supporters will welcome a UN resolution that does not mention his role. Russia's growing diplomatic and military weight in this conflict helped achieve that compromise. But, for the opposition and their allies, it will continue to be the issue that will block progress every step of the way.