The effect of small quadrupole magnetic and electrostatic perturbations on the equilibrium of a non-neutral plasma confined in a Malmberg–Penning trap is analyzed on the base of the parallel current constraint derived recently [Kotelnikov and Romé, Phys. Plasmas 15, 072118 (2008)]. The constraint is generalized to the case of nonuniform plasma temperature. Analytical solutions for the electric potential variations inside the trap and Pfirsch–Schlüter currents are found in the paraxial limit for stepwise radial density profiles of the plasma. It is shown that the equilibrium distorted by a magnetic quadrupole is qualitatively different from that perturbed by an electric quadrupole. In particular, a magnetic quadrupole squeeze perturbs the plasma potential only within a localized region, whereas an electric quadrupole squeeze perturbs the potential in the entire plasma column. On the other hand, axially variable parts of the perturbed potential have similar radial profiles for both electric and magnetic quadrupoles.