Linear complementary dual codes over finite fields and over finite rings have become of interest due to their nice algebraic structures and wide applications. In this paper, we focus on linear complementary dual codes over the ring , where q is a prime power and \(u^e=0\) . Complete characterization and enumeration of such codes are given under both the Euclidean and Hermitian inner products. As applications, these results are applied in the study of complementary dual quasi-abelian codes over finite fields \(\mathbb {F}_{\! p^m}\) . Characterization and enumeration of Euclidean and Hermitian complementary dual \(A\hspace{1.111pt}{\times }\hspace{1.111pt}\mathbb {Z}_{p^s}\) -quasi-abelian codes in a group algebra \(\mathbb {F}_{\!p^m}[A\hspace{1.111pt}{\times }\hspace{1.111pt}\mathbb {Z}_{p^s}\hspace{1.111pt}{\times }\hspace{1.111pt}B]\) are presented for all finite abelian groups A and B such that \(p\not \mid |A|\) . Precisely, such codes can be represented in terms of Euclidean linear complementary dual codes, Hermitian linear complementary dual codes, and linear complementary pairs of linear codes over Galois extension of the ring \(R_{p^m\!,e}\) .