A person has spent decades of his life stealing, gambling and cannot remember who he has stolen from. What should he do?
In the Name of Allah, the Most Gracious, the Most Merciful.
As-salāmu ‘alaykum wa-rahmatullāhi wa-barakātuh.
One of the first things a person should do is sincere repentance. Sincere repentance from a sin which was done against other humans includes:
1) Leaving that sin
2) Being remorseful
3) Having a firm intention never to commit
4) Repay the dues of the wronged parties.
One must exert all effort and thought in trying to ascertain whose money was stolen and return the same amount back one way or another. Only after returning the wealth to rightful recipients will a person’s tawbah be truly complete.
However, in the scenario where a person genuinely cannot remember everybody from whom money was stolen from, despite trying one’s best to remember, he may as a last resort regularly donate money to charity according to his capacity. He should give in charity with the intention that if he realises the true recipients, he will give the funds to them. He should keep giving in charity for as many years and as frequently as possible to cover the outstanding debt on him.
And Allah Ta’ālā Alone Knows Best
Mufti Faraz Adam al-Mahmudi,
 عَلَيْهِ دُيُونٌ لِأُنَاسٍ لَا يَعْرِفُهُمْ مِنْ غُصُوبٍ وَمَظَالِمَ وَجِبَايَاتٍ يَتَصَدَّقُ بِقَدْرِهِ عَلَى الْفُقَرَاءِ عَلَى عَزِيمَةِ الْقَضَاءِ إنْ وَجَدَهُمْ مَعَ التَّوْبَةِ إلَى الله تَعَالَى فَيُعْذَرُ وَلَوْ صَرَفَ ذَلِكَ إلَى الْوَالِدَيْنِ أَوْ الْمَوْلُودِينَ يَصِيرُ مَعْذُورًا وَكَذَا فِي إزَالَةِ الْخُبْثِ عَنْ الْأَمْوَالِ. (الهندية ج 5 ص 367 الرشيدية)