  The inverse proximity effect, i.e. the induction of a magnetic moment in the
superconductor in superconductor-ferromagnet (S/F) junctions is studied
theoretically. We present a microscopic approach which combines a model
Hamiltonian with elements of the well established quasiclassical theory. With
its help we study systems with arbitrary degree of disorder, interface
transparency and thickness of the layers. In the diffusive limit we recover the
result of previous works: the direction of the induced magnetization $M$ is
opposite to the one of the F layer. However, we show that in the ballistic case
the sign of $M$ may be positive or negative depending on the quality of the
interface and thickness of the layers. {We show that, regardless of its sign,
the penetration length of the magnetic moment into the superconductor is of the
order of the superconductor coherence length, which demonstrates that the
effect has a superconducting origin.}
