in The Arabian Nights, a poor woodcutter who accidentally discovers the treasure of a band of forty thieves in a cave: he makes the door of the cave open by saying “Open sesame!”
See Ali Baba in American Heritage Dictionary 4
noun
A poor woodcutter in the Arabian Nights who gains entrance to the treasure cave of the 40 thieves by saying the magic words “Open, Sesame!”