*BSD News Article 50692


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!classic.iinet.com.au!news.uoregon.edu!usenet.eel.ufl.edu!news.mathworks.com!uunet!in1.uu.net!EU.net!uknet!eldorado.net-tel.co.uk!usenet
From: Andrew Gordon <andrew.gordon@net-tel.co.uk>
Subject: Re: Problem with NFS
X-Nntp-Posting-Host: evening-star.net-tel.co.uk
Content-Type: text/plain; charset=us-ascii
Message-ID: <DErBp4.LHp@net-tel.co.uk>
To: K.R.Marshall@ukc.ac.uk
Sender: usenet@net-tel.co.uk (usenet poster)
Content-Transfer-Encoding: 7bit
Organization: NET-TEL Computer Systems Ltd
References: <577@crane.ukc.ac.uk>
Mime-Version: 1.0
Date: Mon, 11 Sep 1995 20:03:02 GMT
X-Mailer: Mozilla 1.1N (Macintosh; I; PPC)
X-Url: news:577@crane.ukc.ac.uk
Lines: 26

K.R.Marshall@ukc.ac.uk (Keith Marshall) wrote:
>The problem I am having is that I need to allow anonymous netowrk
>users to mount drives on the server. At the moment, I can only mount a
>drive if PC-NFS has authenticated me. Now, I've tried changing various
>things in the /etc/exports file but none of these seem to make any
>difference. Even with just the directory (/u0/l/cdrom in this case) on
>the line, and no additional options/users/whatever I have to be logged
>in (under PC-NFS) to remotely mount the directory.
>(by default, anonymous users under PC-NFS have uid and gid -2 - this
>is PC-NFS 5.0 if that makes any difference)

At around line 355 of src/sbin/moutd/mountd.c, you will find:

        case RPCMNT_MOUNT:
                if ((uid != 0 && root_only) || uid == -2) {
                        svcerr_weakauth(transp);
                        return;
                }

which explictly excludes uid=-2 from mounting anything.  You could 
obviously hack this out and re-build mountd, though round here (before 
we threw out PCNFS) we used to simply put 'net name guest' or similar in 
the autoexec.bat to avoid being anonymous in the first place.