<PAGE>   1
                                                                  Exhibit 10.3



                            STOCK PURCHASE AGREEMENT

     This Stock Purchase Agreement (the "Agreement"), to be effective as of
March 20, 1998, by and between Hadco Corporation ("Hadco") and Frederick G.
McNamee, III, an individual ("Purchaser") .

     1. Terms of Purchase. Subject to the other terms and conditions of this
Agreement, the Purchaser hereby agrees to purchase from Hadco, and Hadco hereby
agrees to sell to the Purchaser, forty thousand (40,000) shares of the common
stock of Hadco, $0.05 par value (the "Shares"), for the sum of One Million Four
Hundred Eighty Thousand Dollars ($1,480,000.00), or $37.00 per share, based on
the fair market value of the Shares (measured as the average between the high
and low trading prices of Hadco's common stock on the last business day
immediately preceding the effective date set forth above). Payment for the
Shares shall be in lawful money of the United States of America in the form of
cash, check or similar negotiable instrument. Upon such payment and satisfaction
of all conditions set forth in this Agreement, Hadco's transfer agent,
BankBoston/Boston EquiServe Services, shall on behalf of Hadco, mail or deliver
to the Purchaser, as promptly as practicable, a stock certificate or
certificates representing the Shares being purchased.

     2. Representations and Warranties of Purchaser. As an inducement to Hadco
to sell the Shares to the Purchaser, the Purchaser represents and warrants to
Hadco as follows, intending that such representations and warranties will
survive the admission of the Purchaser as a stockholder of Hadco:

          (a) The Purchaser is over 21 years of age and is legally competent to
     execute this Agreement.

          (b) The Purchaser has carefully reviewed and understands the risks of
     an investment in Hadco, is able to bear the economic risks of an investment
     in Hadco, can withstand a complete loss of his investment in the Shares,
     can hold the Shares for an indefinite period of time and has the net worth
     to undertake these risks.

          (c) The Purchaser, either alone or together with the assistance of the
     Purchaser's own professional advisor or advisors, has the knowledge and
     experience in business and financial matters that make the Purchaser
     capable of reading and interpreting financial statements of and concerning
     Hadco and of evaluating the merits and risks of an investment in the
     Shares. The Purchaser is an "Accredited Investor" as such term is defined
     in Regulation D of the Securities Act of 1933, as amended (the "Securities
     Act").

          (d) The Purchaser understands that an investment in the Shares is
     highly speculative, but believes that an investment in the Shares is
     suitable for the Purchaser based upon his investment objectives and
     financial needs, and the Purchaser has adequate 


<PAGE>   2


                                      -2-


     means for providing for his current financial needs and personal
     contingencies and has no need for liquidity of investment with respect to
     the Shares.

          (e) The Purchaser is acquiring the Shares for purposes of long-term
     investment, for the personal account of the Purchaser, and with no present
     intention of reselling, distributing or otherwise transferring the Shares
     or any portion of the Shares, and the Purchaser has no contract,
     undertaking or arrangement with any person or entity to sell or transfer
     all or any portion of the Shares to that person or entity, or to have that
     person or entity sell for him all or any portion of the Shares, or to
     afford or allow any participation in the Shares by any other person or
     entity.

          (f) The Purchaser understands and acknowledges that the Shares will be
     lettered or restricted stock, that the Shares are being offered and sold
     under the exemption to registration provided in Section 3(b) of the
     Securities Act and Regulation D promulgated thereunder and/or Section 4(2)
     of the Securities Act, and that this transaction has not been reviewed or
     passed upon by any federal or state agency. The Purchaser further
     understands and acknowledges that each certificate of Shares issued in
     connection with this Agreement shall contain the following restrictive
     legends:

               1. "The Shares represented by this certificate are subject to
          restrictions on transfer contained in the terms and conditions of the
          Stock Purchase Agreement by and between Hadco Corporation and
          Frederick G. McNamee, III, dated March __, 1998."

               2. "The Shares represented by this certificate have not been
          registered under the Securities Act of 1933. These Shares have been
          acquired for investment and not with a view to distribution or resale,
          and may not be sold, mortgaged, pledged, hypothecated or otherwise
          transferred without an effective registration statement of such Shares
          under the Securities Act of 1933, or an opinion of counsel for Hadco
          Corporation that registration is not required under such Act."

          (g) The Purchaser realizes that (i) the purchase of the Shares is a
     long-term investment; (ii) the Purchaser must bear the economic risk of
     investment for an indefinite period of time because the Shares have not
     been registered and, therefore, cannot be sold unless they are subsequently
     registered or exemptions from registration are available; (iii) there
     presently is no public market for the Shares, and the Purchaser may not be
     able to liquidate his investment in the Shares in the event of an emergency
     or to pledge the Shares as collateral for loans; and (iv) the
     transferability of the Shares is restricted, and (A) requires the written
     consent of Hadco, (B) requires conformity with the restrictions contained
     in paragraph (f) above, (C) will be further restricted by legends placed on
     the certificate representing the Shares referring to the applicable
     restrictions on transferability, and (D) may be subject to a stop transfer
     order until such time as transfer 


<PAGE>   3


                                      -3-


     of the Shares may be effected without violation of all applicable state and
     federal securities laws.

          (h) The Purchaser has been furnished materials relating to Hadco (or
     these materials have been made available to the Purchaser), including the
     annual report of Hadco for its most recent fiscal year, the proxy statement
     used in connection with the annual meeting of Hadco following its most
     recent fiscal year, the reports filed with the Securities and Exchange
     Commission for the periods covering the most recent completed fiscal year
     of Hadco, all reports filed since the end of that year and any other
     materials that the Purchaser has requested.

          (i) The Purchaser has been given access to full and complete
     information regarding Hadco and has utilized that access to his
     satisfaction for the purpose of obtaining information concerning Hadco, an
     investment in the Shares and the terms and conditions of the offering of
     the Shares for the purpose of asking questions of, and receiving answers
     from, Hadco representatives concerning Hadco, an investment in the Shares
     and the terms and conditions of the offering, and for the purpose of
     obtaining any additional information (to the extent reasonably available)
     that is necessary to verify the information provided.

          (j) The Purchaser has obtained, in his judgment, sufficient
     information to understand the business in which Hadco is engaged and to
     evaluate the merits and risks of an investment in Hadco.

          (k) The Purchaser confirms that he has been advised that he should
     rely on his own professional accounting, tax, legal and financial advisors
     with respect to an investment in Hadco and a purchase of the Shares, and
     obtained, to the extent he deems necessary, the Purchaser's own personal
     professional advice with respect to both the risks inherent in an
     investment in the Shares and the suitability of an investment in the Shares
     in light of the Purchaser's financial condition and investment needs.

          (l) The Purchaser certifies, under the penalties of perjury, that he
     is NOT subject to the backup withholdings provisions of Section 3406 (a)
     (1) (c) of the Internal Revenue Code of 1986. The Purchaser understands
     that he would be subject to backup withholding if (i) he failed to furnish
     his Social Security number or taxpayer identification number in this
     Agreement; (ii) the Internal Revenue Service notified Hadco that the
     Purchaser furnished an incorrect Social Security number or taxpayer
     identification number; (iii) the Purchaser was notified that he is subject
     to backup withholding; or (iv) the Purchaser failed to certify that he is
     not subject to backup withholding or failed to certify his Social Security
     number or taxpayer identification number.


<PAGE>   4


                                      -4-


          (m) The address set forth below is the Purchaser's true and correct
     residence, and he has no present intention of becoming a resident of any
     other state or jurisdiction.

          (n) All of the information that the Purchaser has furnished to Hadco,
     or that is set forth herein, or that is contained in any purchaser
     questionnaire that has been provided to Hadco in connection with this
     Agreement, is correct and complete as of the date hereof, and, if there
     should be any material change in the information prior to the admission of
     the Purchaser as a stockholder of Hadco, the Purchaser will immediately
     furnish the revised or corrected information to Hadco.

     3. Indemnification. The Purchaser acknowledges that he understands the
meaning and legal consequences of the representations and warranties contained
herein and agrees to indemnify Hadco and hold it harmless from and against any
and all loss, damage, expense, or liability due to, or arising out of, any
breach of any representation or warranty of the Purchaser contained herein.

     4. Assignment. The Purchaser acknowledges and agrees that he may not
transfer or assign this Agreement, or any interest in this Agreement, and that
any such purported assignment shall be null and void.

     5. Survival of Agreement. The Purchaser understands and agrees that this
Agreement will survive the death or disability of the Purchaser, except as
provided in the following paragraph.

     6. Termination of Agreement. If any one or more of the representations and
warranties of the Purchaser contained herein are not true prior to the purchase
of the Shares by the Purchaser, and written notice of that fact has been given
to Hadco, then and in any of such events this Agreement shall be null and void
and of no further force or effect, and neither party shall have any rights
against the other party hereunder, this Agreement will be canceled, and the
payment for the Shares will be returned to the Purchaser.

     7. Notice. All notices or other communications given or made hereunder
shall be in writing and delivered or mailed by registered or certified mail,
return receipt requested, postage prepaid, to the Purchaser at the address set
forth below, and to Hadco at 12A Manor Parkway, Salem, NH 03079, with copies to
James C. Hamilton, Clerk, Berlin, Hamilton & Dahmen, LLP, 73 Tremont Street,
Boston, MA 02108.

     8. Entire Agreement. This Agreement constitutes the entire agreement
between the parties hereto with respect to the subject matter hereof, and may be
amended only by a writing executed by all of the parties hereto.


<PAGE>   5


                                      -5-


     9. Governing Law. This Agreement shall be governed by and construed in
accordance with the laws of the Commonwealth of Massachusetts.

Dated this 20th day of March, 1998.
                                      /s/ Rick McNamee
                                     ------------------------------------
                                     Frederick G. McNamee, III

                                     SS#
                                         --------------------------------
                                     Address:
                                             ----------------------------

                                     ------------------------------------


                                     HADCO CORPORATION

                                     By: /s/ Andrew E. Lietz
                                        ---------------------------------
                                        Andrew E. Lietz
                                        President, CEO