Fixing a cabinet? We have a small cabinet above the refrigerator that come off the...

We have a small cabinet above the refrigerator that come off the ceiling. How should we fix that? Glue, nail, ?????? It's just floppy there.
Answers:    remove the cabinet and check to see how it be fastened to than wall before. Then do any repairs and verbs up before putting the cabinet rear legs up. If it looks ok the way it be done before to sway it repeat that method. Otherwise I would use screws into studs if you can this would be the strongest
Most cabinet are screwed to the wall. Remove it and check to see what has happen to it. make the critical repairs and rehang it. Now, was that so tough to presume through?