1 EXHIBIT 23.1 INDEPENDENT AUDITORS' CONSENT We consent to the incorporation by reference in this Registration Statement on Form S-8 of Medford Bancorp, Inc. of our report dated January 21, 1998 appearing in the Medford Bancorp, Inc. Annual Report on Form 10-K for the year ended December 31, 1997, filed with the Securities and Exchange Commission on March 23, 1998. /s/ Wolf & Company, P.C. Boston, Massachusetts August 28, 1998