No; except in so far as they are prudent; for prudent persons who are scoundrels can seldom, on the whole, be beneficial to society, nor can they be acceptable to a good being.
 John Stuart Mill, A System Of Logic, Ratiocinative And Inductive (1843). copy citation

Context

“Prudence is an attribute; and, in connection with it, two things besides itself are to be considered; prudent persons, who are the subjects of the attribute, and prudential conduct, which may be called the foundation of it. Now is either of these the antecedent? and, first, is it meant, that the approval of God, or benefit to society, is attendant upon all prudent persons ? No; except in so far as they are prudent; for prudent persons who are scoundrels can seldom, on the whole, be beneficial to society, nor can they be acceptable to a good being. Is it upon prudential conduct , then, that divine approbation and benefit to mankind are supposed to be invariably consequent? Neither is this the assertion meant, when it is said that prudence is a virtue; except with the same reservation as before, and for the same reason, namely, that prudential conduct, although in so far as it is prudential it is beneficial to society, may yet, by reason of some other of its qualities, be productive of an injury outweighing the benefit, and deserve a displeasure exceeding the approbation which would be due to the prudence.” source