  The present paper extends to clusters of galaxies the study of Del Popolo
(2012), concerning how the baryon-dark matter (DM) interplay shapes the density
profile of dwarf galaxies. Cluster density profiles are determined taking into
account dynamical friction, random and ordered angular momentum and the
response of dark matter halos to condensation of baryons. We find that halos
containing only DM are characterized by Einasto's profiles, and that the
profile flattens with increasing content of baryons, and increasing values of
random angular momentum. The analytical results obtained in the first part of
the paper were applied to well studied clusters whose inner profiles have
slopes flatter than NFW predictions (A611, A383) or are characterized by
profiles in agreement with the NFW model (MACS J1423.8+2404, RXJ1133). By using
independently-measured baryonic fraction, a typical spin parameter value
$\lambda \simeq 0.03$, and adjusting the random angular momentum, we re-obtain
the mass and density profiles of the quoted clusters. Finally, we show that the
baryonic mass inside $\simeq 10$ kpc, $M_{b,in}$ is correlated with the total
mass of the clusters, %finding a correlation among the two quantities, as
$M_{b,in} \propto M_{500}^{0.4}$.
