Context.In the solar corona, shocks can be generated due to the pressure pulse of a flare and/or driven by a rising coronal mass ejection (CME). Coronal shock waves can be observed as solar type II radio bursts in the Sun’s radio radiation. In dynamic radio spectra, they appear as stripes of an enhanced radio emission slowly drifting from high to low frequencies. The radio emission is thought to be plasma emission, that is to say the emission happens near the electron plasma frequency and/or its harmonics. Plasma emission means that energetic electrons excite Langmuir waves, which convert into radio waves via non-linear plasma processes. Thus, energetic electrons are necessary for plasma emission. In the case of type II radio bursts, the energetic electrons are considered to be shock accelerated.Aims.Shock drift acceleration (SDA) is regarded as the mechanism for producing energetic electrons in the foreshock region. SDA delivers a shifted loss-cone velocity distribution function (VDF) for the energetic electrons. The aim of the paper is to study in which way and under which conditions a shifted loss-cone VDF of electrons excites Langmuir waves in an efficient way in the corona.Methods.By means of the results of SDA, the shape of the resulted VDF was derived. It is a shifted loss-cone VDF showing both a loss-cone and a beam-like component. The growth rates for exciting Langmuir waves were calculated in the framework of Maxwell-Vlasov equations. The results are discussed by employing plasma and shock parameters usually found in the corona at the 25 MHz level.Results.We have found that moderate coronal shocks with an Alfven-Mach number in the range 1.59 < MA < 2.53 are able to accelerate electrons up to energies sufficient enough to excite Langmur waves, which convert into radio waves seen as solar type II radio bursts.