Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: NFS question



>>>>> Scott Stone writes:  (on 14 Oct 98)

> you do need to have identical UID/GIDs on all the machines.  Perhaps put
> passwd in /home and have /etc/passwd on each machine be a symlink to it?
> Same for /etc/shadow, /etc/group, /etc/gshadow if used, etc etc.

You should be REALLY careful when mucking with /etc/passwd and friends.
If you are moving things around the network you must consider a crash on
the server or a crash on the client at any point.  Pretty easy to end up
with an unbootable system if you mess up.  For dataless clients this is
usually no big deal (just boot from floppy, fix the problem and be on
your way) but it pays to be clean.

I would do something like the following:

1) Maintain master copies of passwd, group, shadow, and gshadow on a
   designated server.  These should NOT be /etc/passwd, /etc/group, etc.
   but should be stored separately (/etc/MASTER or somesuch).  Create
   perl scripts to act as substitutes for useradd, etc., that manipulate
   these files rather than /etc/passwd.  They should be owned by root
   with 600 permisions.  RCS can be your friend.

2) Either using rdist or NFS, copy these files onto the client.  Let me
   know if you can't figure out how to do this.  Store the files as
   /etc/passwd.new on each client (/etc must be locally mounted).
   Ensure that any previous file is deleted and check for errors at
   every point.

3) Once you are sure that /etc/passwd.new is safely written to each
   client's disk (trickier than it sounds) farm out a job using rsh or
   ssh that does the equivalent of the following on each client:

	# cd /etc
	# mv passwd passwd.old && ln passwd.new passwd && rm passwd.new

	# #repeat for group, shadow, gshadow

    (I'd actually use a perl script for this for easier bullet
    proofing).

> OR do an NFS-root type thing, which linux does support.  You could even
> use diskless workstations.  I'd suggest a 100MBit network for this,
> though, since that's not even very expensive anymore.

Avoid diskless workstations if at all possible.  Simply too much network
traffic.  Better is to define a "standard" client configuration and
install the OS on all clients identically.  The idea is to be able to
clone a client from scratch in just a few minutes.  This is easiest if all
of your clients have identical hardware configurations, but isn't too
hard even with minor variations.  Use standard scripts to do the
post-install configuration (hostname, ip address, etc.).  DHCP can be
your friend.

NFS-roots are useful during an install from scratch, but otherwise I'd
try to avoid them.

Regards,
-- 
Rex
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 12 December, 12:30 Tokyo Station Yaesu central gate
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links