Restoring security in the war-ravaged country where militias control vast territory is the main challenge for Libyan leaders.