Anyone can write fanfiction. Several websites publicize Harry Potter fanfiction; on them, many of the authors are anonymous and go by pen names.