University professors are expected to advise, and see through graduation, their share of M.S. and Ph.D. students.
For "normal" faculty members (i.e. those not waving around Turing awards, Fields medals, and Nobels), the number and quality of Ph.D. students (where I'm from, Masters didn't count) the professor has advised is one of the most, if not the most, important prestige factors.
Getting grants and writing papers will get you tenure, but are significantly less important after you have it.
In areas with fewer DARPA-sized projects, students are definitely the best way to get major influence, though, since producing research progeny is a good way to spread ideas, general approaches to research, etc. It seems to be particularly the case in mathematics that certain mathematicians are influential in part because they mentored a substantial portion of a generation of researchers.