I say: I have not found it in al-Ḥākim with this wording. Al-Kharāʾiṭī narrated something close to it in Makārim al-Akhlāq (p. 9), through Fuḍayl ibn Sulaymān al-Numayrī, from Ṣāliḥ ibn Khawwāt, from Muḥammad ibn Yaḥyā ibn Ḥibbān, from Abū Ṣāliḥ, from Abū Hurayrah, who said: The Messenger of Allah, peace and blessings be upon him, said:
“By his good character, a man may attain the ranks of one who fasts and stands in prayer, going thirsty during the hottest parts of the day.”
I say: Its chain of transmission is good. Its narrators are reliable and are narrators of the two Shaykhs, although al-Numayrī has some weakness, apart from Ṣāliḥ ibn Khawwāt. A number of scholars narrated from him, and Ibn Ḥibbān included him in al-Thiqāt. Al-Bukhārī also narrated something similar from him in al-Adab al-Mufrad (284).
As for al-Ḥākim, his wording is: “By his good character, Allah raises a servant to the rank of fasting and prayer.” He narrated it (1/60) through Ibrāhīm ibn al-Mustamir al-ʿArūqī, who said: Ḥabbān ibn Hilāl narrated to us; Ḥammād ibn Salamah narrated to us, from Budayl, from ʿAṭāʾ, from Abū Hurayrah. He said: “Authentic according to the criteria of Muslim.” Al-Dhahabī concurred with him.
I say: Al-ʿArūqī is not among Muslim’s narrators, so it is authentic, but not according to his criteria.
795 — “By his good character, a man may attain the ranks of one who stands in prayer at night and fasts by day.”
Abū Dāwūd (4798), Ibn Ḥibbān (1927), and al-Ḥākim (1/60) narrated it through ʿAmr ibn Abī ʿAmr, from al-Muṭṭalib ibn ʿAbd Allāh ibn Ḥanṭab, from ʿĀʾishah (may Allah be pleased with her), who said: The Messenger of Allah, peace and blessings be upon him, said this. Al-Ḥākim said: “Authentic according to the criteria of the two Shaykhs.” Al-Dhahabī concurred with him.