Any person having a valid subsisting interest in real property, and a right to the possession thereof, may recover the same by action in the superior court of the proper county, to be brought against the tenant in possession; if there is no such tenant, then against the person claiming the title or some interest therein, and may have judgment in such action quieting or removing a cloud from plaintiff's title; an action to quiet title may be brought by the known heirs of any deceased person, or of any person presumed in law to be deceased, or by the successors in interest of such known heirs against the unknown heirs of such deceased person or against such person presumed to be deceased and his or her unknown heirs, and if it shall be made to appear in such action that the plaintiffs are heirs of the deceased person, or the person presumed in law to be deceased, or the successors in interest of such heirs, and have been in possession of the real property involved in such action for ten years preceding the time of the commencement of such action, and that during said time no person other than the plaintiff in the action or his or her grantors has claimed or asserted any right or title or interest in said property, the court may adjudge and decree the plaintiff or plaintiffs in such action to be the owners of such real property, free from all claims of any unknown heirs of such deceased person, or person presumed in law to be deceased; and an action to quiet title may be maintained by any person in the actual possession of real property against the unknown heirs of a person known to be dead, or against any person where it is not known whether such person is dead or not, and against the unknown heirs of such person, and if it shall thereafter transpire that such person was at the time of commencing such action dead the judgment or decree in such action shall be as binding and conclusive on the heirs of such person as though they had been known and named; and in all actions, under this section, to quiet or remove a cloud from the title to real property, if the defendant be absent or a nonresident of this state, or cannot, after due diligence, be found within the state, or conceals himself or herself to avoid the service of summons, service may be made upon such defendant by publication of summons as provided by law; and the court may appoint a trustee for such absent or nonresident defendant, to make or cancel any deed or conveyance of whatsoever nature, or do any other act to carry into effect the judgment or the decree of the court.