The attorney general shall begin and prosecute actions against all persons claiming to own any portion of the school or other public lands adversely to the state, whenever, in the attorney general’s opinion, an action can be sustained, and shall cause an appearance to be entered for the state on learning of any application to preempt any such land. In case of any such application the attorney general may require the county attorney of the county in which the same is made to enter such appearance, and may cause witnesses to be subpoenaed, and take such other measures in the premises as the public interests may require.