<PAGE>
 
                                                                    Exhibit 10.6


                             STOCKHOLDER AGREEMENT


This agreement is made this 18th day of March, 1999 by and among The GSI Group,
Inc., a Delaware corporation ("GSI" or the "Company"), Jorge Andrade, an
individual residing at 3209 Falcon Point, Springfield, Illinois 62707
("Andrade"), Howard Buffett, an individual residing at 407 Southmoreland,
Decatur, Illinois 62521 ("Buffett"), John Funk, an individual residing at 152
Southmoreland, Decatur, Illinois 62521 ("Funk"), and Craig Sloan, an individual
residing at #10 DuClaire, Decatur, Illinois 62521 ("Sloan").

This agreement and the amended and restated stock restriction and buy sell
agreement entered into on the date hereof (the "buy sell agreement") replace all
prior stock restriction and buy sell agreements and stock restriction and cross
purchase agreements and any amendments thereto relating to the parties hereto
and their voting stock.  As used herein, "stockholders" refers to each of
Andrade, Buffett, Funk and Sloan as long as he owns stock.

This stockholders agreement addresses corporate governance matters that were
contained in previous stock restriction and buy sell agreements. The amended and
restated stock restriction and buy sell agreement addresses the rights and
obligations the stockholders and GSI have upon the death, disability or
termination of employment from GSI of a stockholder and other matters related to
GSI stock.

This agreement is written in plain English instead of complicated legalese to
make sure the stockholders and their families and advisors can read and
understand its provisions.

It is our primary goal for all parties to this agreement to be treated fairly
and with respect regarding the matters addressed herein.  We would also like to
avoid disputes arising out of confusion or lack of clarity.

1.  S Corporation Status.  The stockholders agree to take all action necessary
    --------------------                                                      
to allow GSI to retain its tax status as an S Corporation ("S Corporation")
under Subchapter S (Section 1361 et seq) of the Internal Revenue Code of 1986,
as amended (the "Code").  The stockholders agree to refrain from taking any
action that would cause GSI to lose its S Corporation status.  As long as GSI is
an S Corporation, GSI will fund the tax liability, including estimated tax
payments, incurred by each stockholder as a result of his ownership of GSI
stock.  As provided in the amended and restated stock restriction and buy sell
agreement, no transfer of stock shall be effective until it is determined that
the recepient will not disallow GSI's S Corporation status.

2.  Actions Requiring Shareholder Approval.  Regardless of what is provided for
    --------------------------------------                                     
in Delaware law, GSI's Certificate of Incorporation or GSI's By-Laws, GSI cannot
take the 

                                       1
<PAGE>
 
following actions without prior written approval of Sloan plus, at a minimum,
two other stockholders:

       a.  authorization of additional shares, except for a public offering of
stock, which shall require only the prior written approval of a majority of the
shares,
 
       b.  termination of GSI's S Corporation status,

       c.  buying or selling any business segment that has a value in excess of
$250,000, except for the sale of all or substantially all of the business or
assets of GSI, which shall require only the prior written approval of a majority
of the shares.

       d.  the adoption or approval of a stock option or equity based incentive
plan for the benefit of employees of GSI, and

       e.  an amendment to GSI's Certificate of Incorporation or By-Laws.

3.  Actions Requiring Board Approval.  Regardless of what is provided for in
    --------------------------------                                        
Delaware law, GSI's Certificate of Incorporation or GSI's By-Laws, GSI cannot
take the following actions without prior written approval of a majority of the
board of directors:

       a.  incurring capital expenditures in a year in excess of the budgeted
capital expenditures,

       b.  entering into operating leases in a year in excess of that year's
operating lease budget,

       c.  removal or significant change in the duties and responsibilities of
an officer who is also a stockholder,

       d.  declaration of a stock or cash dividend,

       e.  incurring, guaranteeing or otherwise becoming liable for indebtedness
for borrowed money in an amount in excess of $500,000, or any action to prepay
any existing indebtedness by an amount in excess of $500,000,

       f.  determination to change GSI's independent auditing firm and

       g.  hiring or firing any person having an annual salary of greater than
$85,000.

4.  Board of Directors.  The Board shall consist of Andrade, Buffett, Funk and
    ------------------                                                        
Sloan.  On the date that these individuals or their estates no longer own GSI
stock, he or his representative shall resign from the board.  Each director
shall receive $10,000 as a result of serving on the board and $5,000 per meeting
(up to a maximum of 8 meetings) per year.  The directors shall also vote in
favor of a $300,000 dividend every year (in addition 

                                       2
<PAGE>
 
to any dividend declared and paid in connection with S Corporation tax liability
as set forth in Section 1 above). Vacancies on the board shall be filled by the
unanimous decision of the directors then in office. A director elected to fill a
vacancy shall have the same remaining term as that of his predecessor. At the
next election, the position shall be filled by the unanimous decision of the
stockholders and until such decision is reached, that board seat shall remain
vacant.

5.  Board Deadlock.  If the board is deadlocked, the shareholder with the
    --------------                                                       
largest percentage of stock shall resolve the deadlock.

6.  Successor CEO.  If Sloan dies while still CEO, whoever is then President
    -------------                                                           
will become CEO until the next election of officers.

7.  Termination of Employment.  To terminate a stockholder from employment, all
    -------------------------                                                  
the other stockholders must agree if the grounds for termination are with
"cause" as that term is defined in that stockholder's employment agreement or if
the grounds are "permanent disability", as defined in the buy sell agreement.
Termination of a stockholder from employment for other grounds requires only the
vote of Sloan and one other stockholder, provided that this provision does not
effect any rights or obligations of the terminated stockholder..

8.  Miscellaneous.
    ------------- 

       a.  Termination of this Agreement.  This agreement will terminate if any
           -----------------------------                                       
of the following events happen:

               i.   adoption of a plan of dissolution of GSI, as long as the
plan is carried out diligently and all assets remaining after payment of or
provision for liabilities are distributed to the stockholders within a
reasonable time thereafter; or

               ii.  all stockholders agree in writing, or

               iii. permanent cessation of the business of GSI, or

               iv.  sale of all or substantially all of the assets or business
of GSI, or

               v.   a single stockholder becomes the legal and beneficial owner
of all the issued and outstanding shares, or
 
               vi.  a public offering takes place.

Termination of this agreement for any reason will not effect any right or remedy
existing before the effective date of the termination.

                                       3
<PAGE>
 
       b. Entire Agreement.  The terms, conditions and covenants contained
herein are the full and complete terms of the agreement between the parties
hereto regarding the subject matter hereof and supersede any and all prior
agreements by and among GSI and the stockholders concerning the subject matter
hereof.  No alterations, amendments or modifications of this agreement shall be
binding on the parties hereto unless reduced to writing and approved by Sloan
and, at a minimum, all but one of the other stockholders.  No alterations,
amendments or modifications to this agreement shall effect a stockholder after
that stockholder experiences an event (as defined in the buy sell agreement).

       c. Binding Effect.  This agreement shall be binding on the parties hereto
and their respective heirs, legal representatives, successors and assigns. All
persons bound by this agreement shall execute the instruments and perform the
acts as may be reasonably necessary or desirable to effectuate the terms and
provisions of this agreement.

       d. Adoption by the Corporation.  By signing this agreement, the
shareholders hereby unanimously approve the entering into of this agreement by
GSI and hereby direct Sloan to execute this agreement on behalf of GSI.

       e. Notices.  Notices given in connection with this agreement will be
deemed to have been given only if in writing and personally delivered, sent by
first class registered or certified mail, postage repaid, return receipt
requested; sent by facsimile, as long as a hard copy is mailed on that date to
the party for whom the notice is intended or sent by other means at least as
fast and reliable as first class mail.  The address to which notices should be
sent are:

       Name                        Address
       ----                        -------

       GSI                         The GSI Group, Inc.
                                   P.O. Box 20
                                   Assumption, IL  62510
                                   Attn:  CEO with a copy to the
                                   General Counsel

       Andrade                     Jorge Andrade
                                   3209 Falcon Point
                                   Springfield, IL  62707

       Buffett                     Howard Buffett
                                   407 Southmoreland Place
                                   Decatur, IL  62521

       Funk                        John Funk
                                   152 Southmoreland
                                   Decatur, IL  62521

                                       4
<PAGE>
 
       Sloan                       John C. Sloan
                                   #10 DuClaire
                                   Decatur, IL  62521

or to such other address as the person to whom notice is given may have
furnished to the other in writing in accordance herewith.  A communication given
by any other means shall be deemed duly given when actually received by the
addressee.

       f.  Governing Law.  This agreement will be interpreted, governed and
construed in all respects by the internal laws of the State of Illinois, and any
action commenced to enforce any of the provisions hereof shall have as its venue
Christian County, Illinois.

       g.  Payment of Legal Costs and Expenses.  If any action is commenced to
challenge or enforce the terms and provisions hereof, the party who is
successful in such action based upon a final, unappealable court order, shall be
reimbursed by the unsuccessfuly party for his fees, costs and expenses
(including, without limitation, reasonable attorneys' and accountants' fees,
costs and expenses) incurred in connection with the legal proceeding.

       h.  Gender.  Any pronouns, wherever used herein, shall include the
corresponding masculine, feminine or neuter pronouns and the plural shall
include the singular, and vice versa.

       i.  Headings.  Article and paragraph headings are included herein solely
for convenience and shall not be construed to modify or explain any of the
substantive provisions hereof.

       IN WITNESS WHEREOF, GSI has caused this agreement to be signed by its
duly authorized officer, and the stockholders have signed their names, all on
the day and year first above written.

                                        THE GSI GROUP, INC.


                                        BY /s/ Craig Sloan
                                          ----------------------------
                                        ITS    CEO


/s/ Howard Buffett                      /s/ Jorge Andrade
------------------------                ------------------------------
HOWARD BUFFETT                          JORGE ANDRADE


/s/ John Funk                           /s/ Craig Sloan
------------------------                ------------------------------
JOHN FUNK                               CRAIG SLOAN

                                       5