EX-5 2 a5203695ex5.txt EXHIBIT 5 Exhibit 5 [LETTERHEAD OF BALLARD SPAHR ANDREWS & INGERSOLL, LLP] August 10, 2006 CompuDyne Corporation 2530 Riva Road, Suite 201 Annapolis, Maryland 21401 Re: CompuDyne Corporation 2005 Stock Option Plan for ------------------------------------------------ Non-Employee Directors - Registration Statement on Form S-8 ----------------------------------------------------------- Gentlemen: We have acted as counsel to CompuDyne Corporation (the "Company") in connection with the registration under the Securities Act of 1933, as amended, of 400,000 shares (the "Shares") of the Company's common stock, par value $0.75 per share, issuable pursuant to awards ("Awards") to be granted under the CompuDyne Corporation 2005 Stock Option Plan for Non-Employee Directors (the "Plan"). Awards made pursuant to the Plan may consist of grants of options to purchase shares of the Company's common stock. In rendering our opinion, we have reviewed and relied on originals or copies of: (i) the registration statement on Form S-8 of the Company relating to the Plan intended to be filed with the Securities and Exchange Commission (the "Commission") on the date hereof (the "Registration Statement"); (ii) the Plan; (iii) the Restated Certificate of Incorporation, as amended, of the Company and the Amended and Restated Bylaws of the Company; (iv) certain resolutions of the Board of Directors relating to the Plan and the filing of the Registration Statement; and (v) such certificates, documents, corporate records and other instruments and matters of law as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. In giving this opinion, we are assuming the authenticity of all instruments presented to us as originals, the conformity with the originals of all instruments presented to us as copies, the genuineness of all signatures, and the legal capacity of all natural persons. The opinion expressed below is based on the assumption that the Registration Statement will have been filed by the Company with the Commission and will have become effective before any of the Shares are issued, and that persons acquiring the Shares will do so strictly in accordance with the terms of the Plan, and the applicable certificates or agreements issued to such persons, and will receive a prospectus containing all the information required by Part I of the Registration Statement on Form S-8 before acquiring such Shares. Based on the foregoing, we are of the opinion that the Shares, when issued pursuant to purchases under the Plan (including the payment of the exercise price) in accordance with the terms and conditions thereof, will be legally issued, fully paid and non-assessable. This opinion is limited to the matters expressly stated herein. No implied opinion may be inferred to extend this opinion beyond the matters expressly stated herein. We do not undertake to advise you or anyone else of any changes in the opinions expressed herein resulting from changes in law, changes in facts or any other matters that hereafter might occur or be brought to our attention. We consent to the filing of this opinion as Exhibit 5 to the Registration Statement on Form S-8 being filed with respect to the offering of the Shares. Very truly yours, /s/ Ballard Spahr Andrews & Ingersoll, LLP