Catalyzes the dephosphorylation of D-ribitol-5-phosphate and D-ribitol-1-phosphate. Is also able to dephosphorylate 5-amino-6-(5-phospho-D-ribitylamino)uracil, and thus could be involved in the riboflavin biosynthesis pathway. D-ribitol 1-phosphate + H2O = phosphate + ribitol D-ribitol 5-phosphate + H2O = phosphate + ribitol 5-amino-6-(5-phospho-D-ribitylamino)uracil + H2O = 5-amino-6-(D-ribitylamino)uracil + phosphate kcat is 1.8 sec(-1) with D-ribitol-1-phosphate as substrate. kcat is 1.5 sec(-1) with D-ribitol-5-phosphate as substrate. kcat is 0.016 sec(-1) with 5-amino-6-(5-phospho-D-ribitylamino)uracil as substrate. Cofactor biosynthesis; riboflavin biosynthesis; 5-amino-6-(D-ribitylamino)uracil from GTP: step 4/4. Belongs to the HAD-like hydrolase superfamily.