This paper proposes a unified two-dimensional maximum-likelihood multipath channel estimator for both multicarrier and single-carrier CDMA systems with cyclic prefix. The conditions for the optimal training sequence and the lower bound for the performance of this estimator are obtained by solving an optimisation problem. Optimal and sub-optimal training sequences are designed from several classes of sequences with ideal autocorrelation and cross correlation properties. Furthermore, the complexity of this channel estimator is reduced considerably by applying the optimal training sequence. The simulation results demonstrate that this channel estimator combined with optimal or sub-optimal sequence can give near single-user channel estimation performance even for fully loaded systems.