It said a man of Syrian origin confessed to plotting to stab Mr. Obama .