Ring homomorphism with $\phi(1_R) \neq1_S$
Solution 1:
Let $R$ be any ring and $S=R\times R$. Then the inclusion map $r\mapsto (r,0)$ gives you such a homomorphism. (Note that some authors require that $\phi(1_r)=1_S$ for $\phi$ to be a homomorphism).
Solution 2:
Since for any homomorphism $\phi$, $$\phi(1_R) = \phi(1_R \cdot 1_R) = \phi(1_R)\phi(1_R),$$ any homomorphism must map $1_R$ to an idempotent element of $S$. If you map to an idempotent element other than $1_S$, the image of $\phi$ will be a subring $S'$ of $S$ and you will find that whatever element you mapped $\phi(1_R)$ to will end up being $1_{S'}$.
Note that not every idempotent element of $S$ is a valid candidate. Some concrete examples:
Valid:
Let $R = \mathbb{Z}/6\mathbb{Z}$ and $S = \mathbb{Z}/15\mathbb{Z}$. If we defined $\phi(1_R) = 10_S$, which is idempotent in $S$, we have defined a valid homomorphism.
Invalid:
Let $R = \mathbb{Z}/6\mathbb{Z}$ and $S = \mathbb{Z}/15\mathbb{Z}$. If we define $\phi(1_R) = 6_S$, both idempotent in $S$, the mapping is not well defined. For example, $$\phi(0_R) = \phi(6_R)$$ since $R \cong Z_6$, but $$\phi(6_R) = 6_S \neq 0_S = \phi(0_R).$$ Thus, such a mapping is not well defined.
A similar problem occurs if we define $\phi(1_R) = 1_S$. Thus when we only consider homomorphisms which map the identity of the domain to the identity of the codomain, we find the following theorem.
Theorem: A homomorphism $\phi: \mathbb{Z}/m\mathbb{Z} \rightarrow \mathbb{Z}/n\mathbb{Z}$ exists only if $n$ divides $m$.