حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا جَرِيرٌ، عَنْ عَبْدِ الْعَزِيزِ بْنِ رُفَيْعٍ، عَنْ عُبَيْدِ اللَّهِ ابْنِ الْقِبْطِيَّةِ، عَنْ أُمِّ سَلَمَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم بِقِصَّةِ جَيْشِ الْخَسْفِ قُلْتُ يَا رَسُولَ اللَّهِ فَكَيْفَ بِمَنْ كَانَ كَارِهًا قَالَ ‏"‏ يُخْسَفُ بِهِمْ وَلَكِنْ يُبْعَثُ يَوْمَ الْقِيَامَةِ عَلَى نِيَّتِهِ ‏"‏ ‏.‏

Umm salamah reported the Prophet (PBUH) as saying about the swallowing up an army by the earth. I asked: How will a man who comes against his will (be swallowed up by the earth), Messenger of Allah ? He replied: All will be swallowed up, but each will be raised according to his intention on the Day of Resurrection. Translation Not Available

Book Ref: Sunan Abi Dawud Book 38 Hadith 4289
Web Ref:  Sunan Abi Dawud Book 37 Hadith 4276