The ultimate way to attain true salvation in Mormonism is by performing works in the temples for the dead (usually your own relatives). The best way to get many of the names you’ll need to do this is by going to the genealogical library in Salt Lake City, UT.
There you will find literally millions of “pedigree charts” which are itemized lists of each relative and their vital stats which include date and place of birth, date of death, date of marriage and to whom, children, et al.
For a monetary fee you can have these printed out and then take them with you to the temples to be baptized, endowed, sealed and married by proxy for dead relatives.
This is how dead people become Mormons.
D&C 124:28-40 tells the Mormons which buildings are to be used in order for them to be acceptable to the Lord. If they perform works for their dead while not in the temples, the works are unacceptable to Him.