Depends. At my university in Germany, you could choose yourself if you want to enroll or not. Some enrolled, e.g. for the cheap bus ticket and student lunches, other didn't. But there is no general rule for that, every university or even every institute might have its own regulations.