Let Ω⊂ℝN be a smooth bounded domain and let f⁄≡0 be a possibly discontinuous and unbounded function. We give a necessary and sufficient condition on f for the existence of positive solutions for all λ>0 of Dirichlet periodic parabolic problems of the form Lu=h(x,t,u)+λf(x,t), where h is a nonnegative Carathéodory function that is sublinear at infinity. When this condition is not fulfilled, under some additional assumptions on h we characterize the set of λs for which the aforementioned problem possesses some positive solution. All results remain true for the corresponding elliptic problems.