حَدَّثَنَا عَيَّاشُ بْنُ الْوَلِيدِ الرَّقَّامُ، حَدَّثَنَا عَبْدُ الأَعْلَى، حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنِ الْحَسَنِ، عَنْ سَمُرَةَ بْنِ جُنْدُبٍ، أَنَّ نَبِيَّ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏إِذَا أَتَى أَحَدُكُمْ عَلَى مَاشِيَةٍ فَإِنْ كَانَ فِيهَا صَاحِبُهَا فَلْيَسْتَأْذِنْهُ فَإِنْ أَذِنَ لَهُ فَلْيَحْلِبْ وَلْيَشْرَبْ فَإِنْ لَمْ يَكُنْ فِيهَا فَلْيُصَوِّتْ ثَلاَثًا فَإِنْ أَجَابَهُ فَلْيَسْتَأْذِنْهُ وَإِلاَّ فَلْيَحْتَلِبْ وَلْيَشْرَبْ وَلاَ يَحْمِلْ ‏"
Translation
Narrated Samurah ibn Jundub

The Prophet (ﷺ) said: When any of you comes upon livestock, if the owner is with them, let him ask his permission; if he gives him permission, let him milk and drink. If the owner is not with them, let him call out three times; if someone answers him, let him ask his permission; otherwise, let him milk and drink, but not carry anything away.