Employing an admittance representation in the form of a black box model approximated by rational functions for linear power system components or network equivalents to be included in electromagnetic transient studies is a well-known method which improves calculation efficiency. All of the methods that have been proposed to solve the rational approximation problem have made efforts to overcome the problem of preserving the passivity of the final model. Passivity is a vital property, since a non-passive model may lead to an unstable transient simulation in the time domain. In this paper a post-processing technique for passivity enforcement through an iterative process for the detection and compensation of passivity violations is presented. The passivity violation regions are detected via a purely algebraic approach based on the existence of purely imaginary eigenvalues in the Hamiltonian matrix. Then a compensation technique via the perturbation of residues of the rational function is applied. Some examples are used to illustrate the characteristics of the proposed technique in terms of accuracy and efficiency by comparison with the Quadratic Programming (QP) method.