A study is made of acoustic duct modes in two-dimensional and axisymmetric three-dimensional lined ducts with an isentropic inviscid transversely nonuniform mean flow and sound speed. These modes are described by a one-dimensional eigenvalue problem consisting of a Pridmore-Brown equation complemented by hard-wall or impedance-wall boundary conditions. A numerical solution, based on a Galerkin projection and an efficient method for the resulting nonlinear eigenvalue problem, is compared with analytical approximations for low and high frequencies. A collection of results is presented and discussed. Modal wave numbers are traced in the complex plane for varying impedance, showing the usual regular modes and surface waves. A study of a vanishing boundary layer (the Ingard limit) showed that, in contrast to the smoothly converging acoustic modes and downstream running acoustic surface wave, the convergence of the other surface waves is numerically more difficult. Effects of (transverse) turning points and exponential decay are discussed. Especially the occurrence of modes insensitive to the wall impedance is pointed out. Cut-on wave numbers of hard-wall modes are presented as a function of frequency. A strongly nonuniform mean flow gives rise to considerable differences between the modal behavior for low and for high frequencies.