The paper presents a distributed algorithm for joint codeword and power adaptation in the uplink of a Code Division Multiple Access (CDMA) system, in which users sequentially adjust codewords and powers using gradient-based updates to maximize their individual spectral efficiency subject to constraints on the signal-to-interference plus-noise ratios (SINR). Codeword adaptation is based on greedy interference avoidance which decreases the effective interference seen by users, and is followed by incremental power adaptation. The proposed algorithm is analyzed and illustrated with numerical examples obtained from simulations.