  Let $R$ be a commutative ring with identity and let $I$ be a two-generated
ideal of $R$. We denote by $\operatorname{SL}_2(R)$ the group of $2 \times 2$
matrices over $R$ with determinant $1$. We study the action of
$\operatorname{SL}_2(R)$ by matrix right-multiplication on
$\operatorname{V}_2(I)$, the set of generating pairs of $I$. Let
$\operatorname{Fitt}_1(I)$ be the second Fitting ideal of $I$. Our main result
asserts that $\operatorname{V}_2(I)/\operatorname{SL}_2(R)$ identifies with a
group of units of $R/\operatorname{Fitt}_1(I)$ via a natural generalization of
the determinant if $I$ can be generated by two regular elements. This result is
illustrated in several Bass rings for which we also show that
$\operatorname{SL}_n(R)$ acts transitively on $\operatorname{V}_n(I)$ for every
$n > 2$. As an application, we derive a formula for the number of cusps of a
modular group over a quadratic order.
