BOSTON — A Lowell man admitted in federal court to distributing fentanyl and crack cocaine after authorities say he sold drugs to a cooperating witness during a probe that included recorded buys, surveillance, and a final arrest in which more than two ounces of crack cocaine were found hidden in his underwear.