Abu Huraira reported the Prophet as saying, “You will be eager for the office of commander, but it will become a cause of regret on the day of resurrection. It is a good suckler but an evil weaner.”*
Bukhari transmitted it.
*In the beginning it causes pleasure, but later such pleasures are cut off. The idea is that one gladly undertakes high office, but later finds it to be a cause of grief.