TITLE: Example of a ring where all but two of its elements are units
QUESTION [6 upvotes]: One way of viewing a field is just as a ring where all but one of its elements (namely $0$) is a unit. I'm looking for rings (commutative with a 1) where all but two of its elements are units. I found one fairly trivial example, $\mathbb Z/4 \mathbb Z,$ and I think I may have a proof that it's the only example of such a ring that's finite:
If $R$ is some finite ring, then considering $R$ as an additive group and applying the structure theorem for finite abelian groups, we get that $R$ is isomorphic to a direct product of groups of the form $\mathbb Z/n_i \mathbb Z,$ and the $n_i$ are coprime. I believe that this means that $R$ is also isomorphic to this as a ring (is this correct?). For each $n_i$ the size of $\left(\mathbb Z/n_i \mathbb Z\right)^*$ is $\phi(n_i).$ Let $n=|R|$. Since $\phi$ is multiplicative over coprime elements, we have $n=\Pi_i n_i$ and $|R^*|=n-2=\Pi_i \phi(n_i)$. But $\phi(n_i)\leq n_i-1,$ so obviously there can only be one factor $\mathbb Z/n_1 \mathbb Z$. Then $n_1=n$ and all we need is that $\phi(n)=n-2$. Writing $n$ as a product of primes $n=2^{r_2}3^{r_3}5^{r_5}\cdots$ we get 
$$\phi(n)= n-2=\phi(2^{r_2})\phi(3^{r_3}) \phi(5^{r_5})\cdots\\
=(2^{r_2}-2^{r_2-1})(3^{r_3}-3^{r_3-1})(5^{r_5}-5^{r_5-1})\cdots
$$
Again, it's clear that there can only be one factor as otherwise the expression for $\phi(n)$ in the final line would be too small. Say $n=p^{r_p}$ and $p^{r_p}-2=p^{r_p}-p^{r_p-1}$ Then $p^{r_p-1}=2$. Hence $p=2$ and $r_p=2$ i.e. $n=4.$
Can anyone tell me whether this proof is correct or not. 
My main question: are there any more examples with infinite rings? I feel like the answer is no because it seems very hard to have so many units, but I have no idea how to start to prove this in general. I tried local rings: If $R$ was a local ring, with unique maximal ideal $I$, then $R=I\sqcup R^*$ so I need a maximal ideal containing all but two elements which seems impossible, but again I don't know how to prove it. Most of my intuition for this being false is coming from Lagrange I think. Lagrange says that subgroups can't get too large, in particular that if $|G|=n$ then any proper subgroup $H$ must have $|H| \leq n/2$. But Lagrange doesn't work for infinite groups, so I don't know if this intuition is at all valid.

REPLY [4 votes]: If $a \neq 1$ is a unit, and $b \neq 0$ is not, then $ab$ is not a unit either; further, we cannot have $ab = 0$, thus $ab = b$. But then, since $a \neq 1$, $a - 1$ is a zero divisor, so not a unit, so $a - 1 = b$. So there can be at most one unit which is not equal to $1$. Thus if $R$ is a ring with precisely two nonunits then $3 \leq |R| \leq 4$. When combined with awllower's answer we see that the two examples in that answer are the only two, even including infinite rings.