Al-Hasan on Samura’s authority reported the Prophet as saying, “When any of you comes upon animals whose owner is among them he must ask his permission; if not he must call three times and if anyone answers him he must ask his permission; but if no one answers him he may draw some milk and drink, but not carry any away.”
Abu Dawud transmitted it.