Participating in family history and temple work is a sure way to eliminate the influence of the adversary in your life.
8 Be sober, be vigilant; because your adversary the devil, as a roaring lion, walketh about, seeking whom he may devour . . .
Elder Richard G. Scott said:
“Do you young people want a sure way to eliminate the influence of the adversary in your life? Immerse yourself in searching for your ancestors, prepare their names for the sacred vicarious ordinances available in the temple, and then go to the temple to stand as proxy for them to receive the ordinances of baptism and the gift of the Holy Ghost. As you grow older, you will be able to participate in receiving the other ordinances as well. I can think of no greater protection from the influence of the adversary in your life.”
(“The Joy of Redeeming the Dead,” Ensign or Liahona, Nov. 2012, 94.)