EXHIBIT - 23(B) CONSENT OF INDEPENDENT AUDITORS We consent to the reference to our firm under the caption "Experts" in the Amendment No. 1 to Registration Statement (Form S-4) and related Prospectus of United Bankshares, Inc. for the registration of up to 3,138,888 shares of its common stock and to the incorporation by reference therein of our report dated February 7, 1995, with respect to the consolidated financial statements of Eagle Bancorp, Inc. incorporated by reference in its Annual Report (Form 10-K) for the year ended December 31, 1994, filed with the Securities and Exchange Commission. /s/ Ernst & Young LLP Charleston, West Virginia February 6, 1996