I have this question just out of curiosity.

If X is a scheme, then a morphism $f: X \rightarrow X$ can be the identity on the underlying topological space of X, but not the identity on the structure sheaf. For example, f can be the Frobenius morphism.

Does someone know an example of such a morphism which is not a Frobenius? One can simply think in terms of affine schemes and hence ring: does someone know an explicit example of a ring endomorphism (sending 1 to 1) $\phi: X \rightarrow X$ such that $\phi^{-1}(I) = I$ for all prime ideals $I$ ? Is there a nice class of rings for which such an endomorphism is forced to be Frobenius?

1more comment