The Christmas deadline for a ban on the use of bed and breakfast accommodation for homeless families cannot be met, MSPs have been told.
Ministers say B&Bs should only be used in exceptional circumstances
Council officials sounded the warning at a meeting of the parliament's communities committee.
They said the Scottish Executive had sprung the deadline on them last month through "tabloid headlines".
But Communities Minister Malcolm Chisholm said councils could face court action if they did not comply.
He told MSPs he would not delay the new Homeless Persons Bill which promises that by this Christmas no child will have to live in B&Bs other than in "exceptional cases".
Mr Chisholm said that from next week, homeless families forced to live in such accommodation for more than two weeks would be able to take local councils to court.
Edinburgh Council's director of housing Mark Turley said the capital currently had
100 families in B&Bs and the deadline would be difficult.
Four other councils had already said they could not meet the deadline, he added.
Mr Turley was a member of the executive's task force on homelessness, but resigned from the group after the deadline was announced.
He said the executive was expecting too much from local authorities and he could not continue to be a member of the group.
The Homelessness (Scotland) Act places a duty on councils to provide temporary accommodation for homeless people.
The executive's long-term goal is to provide permanent homes for all homeless people by 2012.