The dynamics of an infinite one-dimensional system of hard rods is generalized to include the effects of a random background. Each rod follows a trajectory which is described by a generalized random function and when two rods collide they interchange velocities (and trajectories). An exact solution is obtained for the distribution fs(x,v,tv′) which is the probability of finding a particle at x with velocity v at time t that was at x=0 with velocity v′ at t=0. The most interesting result is that in the long-time limit p(x,t), which is the probability of finding a particle at x at time t that was at x=0 at t=0, is of the form t-14exp(-x2t12). Thus, the spatial distribution does not become Gaussian and Fick's law is not valid. It is suggested that this qualitative behavior might be expected whenever single-file effects become important and that it is not dependent on the details of the one-dimensional hard-rod collisions which have been used in the derivation.