[Gllug] lan with SuSE 8.2

Ian Northeast ian at house-from-hell.demon.co.uk
Sat Jun 21 09:02:59 UTC 2003


Phil Reynolds wrote:
> 
> On Sat, Jun 21, 2003 at 07:37:50AM +0100, michael norman wrote:
> > Hi
> >
> > I have two boxes running SuSE 8.2 connected by a vigor 2200E router.  I want
> > to enable file and directory sharing as in Windows but all my attempts to set
> > up NIS and NFS have failed.  Are these the programmes I should use ?  Can
> > somebody give me a simple how to ? Networking is a mystery to me and the more
> > I read the more confused I get.  I've tried using the various yast 2 modules
> > to no avail, and I don't mind editing config files if I need to.
> 
> You need NFS but there is no need for NIS.
> 
> Are you going to use the userspace or kernel NFS server?

I suggest using the kernel based one as that is how SuSE set it up by
default, it'll be easier.

This is based on 8.1, I doubt if 8.2 is any different.

You can do it all through YaST, but what you need is:

The NFS server installed on any machine which is sharing data. See if
you have a script /etc/init.d/nfsserver.

Portmap installed on both. Check this with "rpcinfo -p" on each machine.
It should show at least:

sctd09 at vsuse1:/home/sctd09> rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper 

Install these through YaST/software if necessary.

Assuming you don't have a local DNS, put both machines in both
/etc/hosts files.

On the server, in /etc/exports:

/directory-to-share	client(rw)

or

/directory-to-share	client(rw,no_root_squash)

if you want root access.

On the server, ensure that there is a symbolic link S??nfsserver ->
../nfsserver in the appropriate run level directory - /etc/init.d/rc3.d
or rc5.d - to get the server started at boot time. Start it if
necessary: /etc/init.d/nfsserver start.

On the client put an entry in /etc/fstab:

server:/directory-to-share	/directory-to-mount-on	nfs
rsize=8192,wsize=8192	0 0

(all one line).

Ensure that the mount point exists. Mount it: mount
/directory-to-mount-on. It will be remounted at boot with that syntax,
if you don't want this add "noauto," in front of the "rsize".

While Phil is correct that you don't need NIS, especially if you only
have a few users, it helps a lot if the user numbers match, i.e. if user
fred is number 501 on one machine it should be 501 on the other too.
Otherwise files will show with the wrong ownerships. If you create the
same userid when you are prompted to do so when installing and
subsequently create the others in the same order on the two machines
this should be the case anyway. A user can be created with a specific
number with useradd -u as long as the number isn't taken.

If you get problems with the server being reported as not responding
even though it appears to be running, check that you don't have any
firewall rules preventing NFS. To do this temporarily disable the
firewall; if that makes it work then you need to look at the rules to
see how they need to be modified. I can't help with this, I never run
the SuSE firewall.

If you want a more Windows like - i.e. with password based
authentication rather than machine and user - file sharing mechanism
then look at Samba and smbmount. While Samba is designed with the
specific objective of sharing data with Windows systems it can just as
well be used to share data between Linux machines and some people prefer
it to NFS.

Regards, Ian

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list