<PAGE>



                                                                     Exhibit 4.2


                     EXHIBIT 4 to RESTRICTED STOCK AGREEMENT
                     ---------------------------------------

                          REGISTRATION RIGHTS AGREEMENT


         This Registration Rights Agreement, dated as of June 1, 2001, is among
DAOU Systems, Inc., a Delaware corporation (the "Company"), and Neil Cassidy
(the "Investor")."

                                    RECITALS


         WHEREAS, the Company and the Investor are parties to that certain
Restricted Stock Agreement, dated June 1, 2001 (the "Purchase Agreement"); and

         WHEREAS, the Parties desire to enter into an agreement concerning the
registration of the shares of common stock, par value $.001 per share (the
"Common Stock"), to be issued pursuant to the Purchase Agreement.

         NOW, THEREFORE, the parties hereby agree as follows:

                                   ARTICLE I
                               REGISTRATION RIGHTS

1.1.  Definitions.  For purposes of this Agreement:

(a)             the term "Register," "Registered," and "Registration" refer to a
      registration effected by preparing and filing a registration statement or
      similar document in compliance with the Securities Act of 1933, as amended
      (the "Act"), and the declaration or ordering of effectiveness of such
      registration statement or document;

(b)             the term "Registrable Securities" means the Common Stock issued
      pursuant to the Purchase Agreement, excluding in all cases, however, any
      Registrable Securities sold by a person in a transaction in which such
      person's rights under this Article I are not assigned;

(c)             the number of shares of "Registrable Securities then
      outstanding" will be the number of shares of Common Stock outstanding
      which are Registrable Securities;

(d)             the term "Holder" means any person owning or having the right to
      acquire Registrable Securities or any permitted assignee thereof; and

(e)             the term "Form S-1" means such form under the Act as in effect
      on the date of this Agreement or any registration form under the Act
      subsequently adopted by the Securities and Exchange Commission ("SEC")
      which permits inclusion or incorporation of substantial information by
      reference to other documents filed by the Company with the SEC.

                                       1

<PAGE>



1.2.  Form S-1 Registration.

         As soon as reasonably practicable after the written request of the
Holders of a majority of the Registrable Securities, the Company shall file with
the SEC one or more Registration Statements on Form S-1 (or other similar form)
covering the continuous sale of the Registrable Securities pursuant to Rule 415
under the Securities Act or any successor thereto (each, a "Shelf Registration
Statement"), in the manner specified therein. The Company shall use all
reasonable efforts to cause each Shelf Registration Statement to be declared
effective by the SEC as soon as reasonably practicable after its filing with the
SEC, and upon reasonable notice from a Holder (and in any event no less than ten
(10) days) that the Holder intends to sell pursuant to a Shelf Registration
Statement, the Company will file such amendments and supplements as necessary to
update the Shelf Registration Statement so that it will be effective for any
such sale of Registrable Securities until the earlier of (x) such time as all of
the Registrable Securities are sold pursuant to such Shelf Registration
Statement or (y) each Holder is able to sell within any ninety (90) day period
all Registrable Securities owned by such Holder pursuant to SEC Rules as then in
effect, including Rule 144 under the Securities Act, or any successor thereto
("SEC Rule 144") (the "Effective Period"); provided that in the event that
Company determines in good faith that, because it has under consideration a
significant (as defined under Regulation S-X of the SEC) acquisition or
disposition or other material transaction or corporate event that has not been
publicly disclosed or that it is in the process of preparing for filing with the
SEC an Annual Report on Form 10-K, a Quarterly Report on Form 10-Q or a Current
Report on Form 8-K or other form, a Shelf Registration Statement may contain a
material misstatement or omission, the Company may cause such Shelf Registration
Statement to not be used during the period in question. The Company agrees it
will use its best efforts to ensure that such deferral will be for the shortest
period of time reasonably required not exceeding, in the aggregate, ninety (90)
days in any twelve (12) month period.

1.3.  Company Registration.

         In the event that (i) the Company fails to satisfy its obligations
pursuant to Section 1.2 or (ii) for any period of not less than thirty (30)
consecutive days a Shelf Registration Statement may not be used for any reason,
and if (but without any obligation to do so) the Company proposes to register
(including for this purpose a registration effected by the Company for
shareholders other than the Holders) any of its stock or other securities under
the Act in connection with the public offering of such securities solely for
cash (other than a registration relating solely to the sale of securities to
participants in a Company stock plan, or a registration on any form which does
not include substantially the same information as would be required to be
included in a registration statement covering the sale of the Registrable
Securities), the Company will, at such time, promptly give each Holder written
notice of such registration. Upon the written request of each Holder given
within twenty (20) days after mailing of such notice by the Company in
accordance with Section 2.5, the Company will cause to be registered under the
Act all of the Registrable Securities that each such Holder has requested to be
registered.

                                       2

<PAGE>

1.4.  Obligations of the Company.


         Except as otherwise expressly specified in this Agreement, whenever
required under this Article I to effect the registration of any Registrable
Securities, the Company will, as expeditiously as reasonably practicable:

(a)             Prepare and file with the SEC such amendments and supplements to
      such registration statement and the prospectus used in connection with
      such registration statement as may be necessary to comply with the
      provisions of the Act with respect to the disposition of all securities
      covered by such registration statement.

(b)             Furnish to the Holders such number of copies of a prospectus,
      including a preliminary prospectus, in conformity with the requirements of
      the Act, and such other documents as they may reasonably request in order
      to facilitate the disposition of Registrable Securities owned by them.

(c)             Use its best efforts to register and qualify the securities
      covered by such registration statement under such other securities or Blue
      Sky laws of such jurisdictions as will be reasonably requested by the
      Holders, provided that the Company will not be required in connection
      therewith or as a condition thereto to qualify to do business or to file a
      general consent to service of process in any such states or jurisdictions.

1.5.  Furnish Information.

         It will be a condition precedent to the obligations of the Company to
take any action pursuant to this Article I with respect to the Registrable
Securities of any selling Holder that such Holder will furnish to the Company
such information regarding itself, the Registrable Securities held by it, the
intended method of disposition of such securities and all of the other pertinent
information as will be required to effect the registration of such Holder's
Registrable Securities.

1.6.  Expenses of Registration.

         Subject to restrictions under applicable state securities laws, all
expenses other than underwriting discounts and commissions incurred in
connection with registrations, filings or qualifications pursuant to Sections
1.2 and 1.3, including (without limitation) all registration, filing and
qualification fees, printers' and accounting fees, and fees and disbursements of
counsel for the Company and the reasonable fees and disbursements of one counsel
representing the Holders will be borne by the Company.

1.7.  Indemnification. If any Registrable Securities are included in a
registration statement under this Article I:

(a)             To the extent permitted by law, the Company will indemnify and
      hold harmless each Holder, each of its directors and each of its officers,
      any underwriter (as defined in the Act) for such Holder and each person,
      if any, who controls such Holder or underwriter within the meaning of the
      Act or the Securities Exchange Act of 1934, as amended (the "Exchange
      Act"), against any losses, claims, damages, or liabilities (joint or
      several) to which they may become subject under the Act, or the Exchange
      Act, insofar as such losses, claims, damages,

                                       3

<PAGE>


      or liabilities (or actions in respect thereof) arise out of or are based
      upon any of the following statements, omissions or violations
      (collectively a "Violation"): (i) any untrue statement or alleged untrue
      statement of a material fact contained in such registration statement,
      including any preliminary prospectus or final prospectus contained therein
      or any amendments or supplements thereto, (ii) the omission or alleged
      omission to state therein a material fact required to be stated therein,
      or necessary to make the statements therein not misleading, or (iii) any
      violation or alleged violation by the Company of the Act, the Exchange
      Act, or any rule or regulation promulgated under the Act, or the Exchange
      Act; and the Company will pay to each such Holder, director, officer,
      underwriter or controlling person, any legal or other expenses reasonably
      incurred by them in connection with investigating or defending any such
      loss, claim, damage, liability, or action; provided, however, that the
      indemnity agreement contained in this Subsection 1.7(a) will not apply to
      amounts paid in settlement of any such loss, claim, damage, liability, or
      action if such settlement is effected without the consent of the Company
      (which consent will not be unreasonably withheld), nor will the Company be
      liable in any such case for any such loss, claim, damage, liability, or
      action to the extent that it arises out of or is based upon a Violation
      which occurs in reliance upon and in conformity with written information
      furnished expressly for use in connection with such registration by any
      such Holder, director, officer, underwriter or controlling person.

(b)             To the extent permitted by law, each selling Holder will
      indemnify and hold harmless the Company, each of its directors, each of
      its officers who has signed the registration statement, each person, if
      any, who controls the Company within the meaning of the Act, any other
      Holder selling securities in such registration statement and any
      controlling person of any such underwriter or other Holder, against any
      losses, claims, damages, or liabilities (joint or several) to which any of
      the foregoing persons may become subject, under the Act or the Exchange
      Act insofar as such losses, claims, damages, or liabilities (or actions in
      respect thereto) arise out of or are based upon any Violation, in each
      case to the extent (and only to the extent) that such Violation occurs in
      reliance upon and in conformity with written information furnished by such
      Holder expressly for use in connection with such registration; and each
      such Holder will pay any legal or other expenses reasonably incurred by
      any person intended to be indemnified pursuant to this Subsection 1.7(b),
      in connection with investigating or defending any such loss, claim,
      damage, liability, or action; provided, however, that the indemnity
      agreement contained in this Subsection 1.7(b) will not apply to amounts
      paid in settlement of any such loss, claim, damage, liability or action if
      such settlement is effected without the consent of the Holder, which
      consent will not be unreasonably withheld; provided, that, in no event
      will any indemnity under this Subsection 1.7(b) exceed the proceeds from
      the offering net of sales commission, if any, received by such Holder.

(c)             Promptly after receipt by an indemnified party under this
      Section 1.7 of notice of the commencement of any action (including any
      governmental action), such indemnified party will, if a claim in respect
      thereof is to be made against any indemnifying party under this Section
      1.7, deliver to the indemnifying party a written notice of the
      commencement thereof and the indemnifying party will have the right to
      participate in, and, to the extent the indemnifying party so desires,
      jointly with any other indemnifying party similarly noticed, to assume the
      defense thereof with counsel satisfactory to the indemnified party (which
      shall not unreasonably withhold its approval); provided, however, that an
      indemnified party

                                       4

<PAGE>

      (together with all other indemnified parties which may be represented
      without conflict by one counsel) will have the right to retain one
      separate counsel, with the reasonable fees and expenses to be paid by the
      indemnifying party, if representation of such indemnified party by the
      counsel retained by the indemnifying party is inappropriate due to actual
      or potential differing interests between such indemnified party and any
      other party represented by such counsel in such proceeding. The failure to
      deliver written notice to the indemnifying party within a reasonable time
      of the commencement of any such action, if prejudicial to its ability to
      defend such action, will relieve such indemnifying party of any liability
      to the indemnified party under this Section 1.7, but the omission so to
      deliver written notice to the indemnifying party will not relieve it of
      any liability that it may have to any indemnified party otherwise than
      under this Section 1.7.

(d)             If the indemnification provided for in this Section 1.7 is held
      by a court of competent jurisdiction to be unavailable to an indemnified
      party with respect to any loss, liability, claim, damage, or expense
      referred to therein, then the indemnifying party, in lieu of indemnifying
      such indemnified party to this Agreement, will contribute to the amount
      paid or payable by such indemnified party as a result of such loss,
      liability, claim, damage, or expense in such proportion as is appropriate
      to reflect the relative fault of the indemnifying party on the one hand
      and of the indemnified party on the other in connection with the
      statements or omissions that resulted in such loss, liability, claim,
      damage, or expense as well as any other relevant equitable considerations.
      The relative fault of the indemnifying party and of the indemnified party
      will be determined by reference to, among other things, whether the untrue
      or alleged untrue statement of a material fact or the omission to state a
      material fact relates to information supplied by the indemnifying party or
      by the indemnified party and the parties' relative intent, knowledge,
      access to information, and opportunity to correct or prevent such
      statement or omission.

(e)             The obligations of the Company and Holders under this Section
      1.7 will survive the completion of any offering of Registrable Securities
      in a registration statement under this Article I, and otherwise.

1.8.  Reports Under 1934 Act.

         With a view to making available to the Holders the benefits of Rule 144
promulgated under the Act and any other rule or regulation of the SEC that may
at any time permit a Holder to sell securities of the Company to the public
without registration or pursuant to a registration on Form S-1, the Company
will:

(a)             make and keep public information available, as those terms are
      understood and defined in SEC Rule 144, at all times;

(b)             file with the SEC in a timely manner all reports and other
      documents required of the Company under the Act and the Exchange Act; and

(c)             furnish to any Holder, so long as the Holder owns any
      Registrable Securities, forthwith upon request (i) a written statement by
      the Company that it has complied with the reporting requirements of SEC
      Rule 144, the Act and the Exchange Act, or that it qualifies as

                                       5

<PAGE>

      a registrant whose securities may be resold pursuant to Form S-3 (at any
      time after it so qualifies), (ii) a copy of the most recent annual or
      quarterly report of the Company and such other reports and documents so
      filed by the Company, and (iii) such other information as may be
      reasonably requested in availing any Holder of any rule or regulation of
      the SEC which permits the selling of any such securities without
      registration or pursuant to such form.

1.9.  Rule 144 Availability.

         Notwithstanding anything to the contrary above in this Article I, prior
to exercising any right provided for in this Article I each Holder will (i)
evaluate in good faith whether such Holder is otherwise permitted to sell the
entire amount of Registrable Securities it is then seeking to register within
the time period it desires to sell pursuant to Rule 144 of the Exchange Act, or
any successor regulation thereto and (ii) exercise such rights only in the case
that it determines in good faith that such rights are necessary to sell such
Registrable Securities in a timely manner.

                                   ARTICLE II
                                  MISCELLANEOUS

2.1.  Successors and Assigns.

         Except as otherwise provided in this Agreement, the terms and
conditions of this Agreement will inure to the benefit of and be binding upon
the respective successors and assigns of the parties (including transferees of
any shares of Registrable Securities). Nothing in this Agreement, express or
implied, is intended to confer upon any party other than the parties to this
Agreement or their respective successors and assigns any rights, remedies,
obligations, or liabilities under or by reason of this Agreement, except as
expressly provided in this Agreement.

2.2.  Governing Law.

         This Agreement will be governed by and construed under the laws of the
State of Delaware.

2.3.  Counterparts.

         This Agreement may be executed in two or more counterparts, each of
which will be deemed an original, but all of which together will constitute one
and the same instrument.

2.4.  Titles and Subtitles.

         The titles and subtitles used in this Agreement are used for
convenience only and are not to be considered in construing or interpreting this
Agreement.

2.5.  Notices.

         Unless otherwise provided, any notice required or permitted under this
Agreement will be given in writing and will be deemed effectively given upon
personal delivery to the party to be notified, by telecopy upon the appropriate
answer-back, or upon deposit with the United States Post Office, by registered
or certified mail, postage prepaid and addressed to the party to be

                                       6

<PAGE>

notified at the address indicated for such party on Schedule 1 or at such other
address as such party may designate by ten (10) days' advance written notice to
the other parties.

2.6.  Expenses.

         If any action at law or in equity is necessary to enforce or interpret
the terms of this Agreement, the prevailing party will be entitled to reasonable
attorneys' fees, costs and necessary disbursements in addition to any other
relief to which such party may be entitled.

2.7.  Amendments and Waivers.

         Any term of this Agreement may be amended and the observance of any
term of this Agreement may be waived (either generally or in a particular
instance and either retroactively or prospectively), only with the written
consent of the Company and the Holders of a majority of the Registrable
Securities then outstanding. Any amendment or waiver effected in accordance with
this paragraph will be binding upon each Holder of any Registrable Securities
then outstanding, each future Holder of all such Registrable Securities, and the
Company.

2.8.  Severability.

         If one or more provisions of this Agreement are held to be
unenforceable under applicable law, such provision will be excluded from this
Agreement and the balance of the Agreement will be interpreted as if such
provision were so excluded and will be enforceable in accordance with its terms.

2.9.  Aggregation of Stock.

         All shares of Registrable Securities held or acquired by affiliated
entities or persons will be aggregated together for the purpose of determining
the availability of any rights under this Agreement.

2.10. Entire Agreement, Amendment, Waiver.

         This Agreement (including the Schedules to this Agreement, if any)
constitutes the full and entire understanding and agreement between the parties
with regard to the subjects of this Agreement and thereof.

2.11. Adjustments for Stock Splits.

         Wherever in this Agreement there is a reference to a specific number of
shares of Common Stock of the Company of any class or series, or a reference to
any amount of dollars per any such share, then, upon the occurrence of any
subdivision, combination or stock dividend of such class or series of stock, the
specific number of shares or the specific dollar amount so referenced in this
Agreement will automatically be proportionately adjusted to reflect the effect
on the outstanding shares of such class of series of stock by such subdivision,
combination or stock dividend.

                                       7

<PAGE>

         IN WITNESS WHEREOF, the parties have executed this Agreement as of the
date first above written.

THE COMPANY:

DAOU SYSTEMS, INC.


By:      /s/ James T. Roberto
   --------------------------------------------------
Name:    James T. Roberto
Title:   President, Chief Executive Officer


THE INVESTOR:


   /s/ Neil R. Cassidy
-----------------------------------------------------
Neil R. Cassidy

                                       8

<PAGE>


                                   SCHEDULE 1
                                    INVESTOR
                                     ------


                                NAME AND ADDRESS
                                     ------


Neil R. Cassidy
Address on file with the Company

                                       9