There are lots of "Ext groups" in homological algebra which measure extensions of various things. I'm sure there must be a homological algebra machine for computing the following, and I'm hoping that someone out there knows about it. 


I'm interested in the following situation. Let R and S be commutative rings and fix a ring homomorphism $f:R \to S$. Also fix a commutative S-algebra A. I'm interested in understanding/classifying those R-algebras B, together with a (surjective?) ring homomorphism $g: B \to A$ which intertwines the algebra structures in the following sense:


$ g(rb) = f(r) g(b)$


for all $r \in R$, and $ b \in B$. Is there a homological algebra way to do this? 


A particular example that I am interested in is when we have the equality $B \otimes\_R S = A$, but I am also interested in other cases as well. 



Classifying Algebra Extensions over a fixed extension?
I think your problem is not constrained enough to have an interesting answer. Notice that your intertwining condition can be rephrased by saying that $g: B \to A$ is a homomorphism of $R$-algebras, where $A$ is given the structure of $R$-algebra given by $f$. In these terms, what you are looking for is the comma category $\mathcal{C} = (\mathbf{Alg}\_R \downarrow A)$, whose objects are precisely the pairs $(B, g)$ as above, and whose morphisms $\operatorname{Hom}\_{\mathcal{C}}((B, g), (B', g'))$ are the $R$-algebra homomorphisms $h: B \to B'$ such that $g = g' \circ h$. I am not sure it is possible to capture this beast with a cohomology group of any sort.


What you can do is restrict the class of objects that you are looking at. For example, you can classify square-zero extensions: fixing an $A$-module $I$, you can look at $R$-algebras $B$ such that you have a short exact sequence $0 \to I \to B \to A \to 0$; the name square-zero comes from the fact that $I$ is an ideal of $B$ with $I^2 = 0$. You can read about them in the first chapter of Sernesi's *Deformations of Algebraic Schemes*.


