login
Header Space

 
 

NFS mount by non-root

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Wednesday, April 25, 2007 - 11:33 pm

Is it possible for users (non-root) to mount NFS exports?
I seem to be able to mount_nfs using sudo, but not as a regular user.
I actually want to allow regular users to mount the NFS share from
another machine/OS (MacOSX), but since I couldn't get a regular user
to do the mount just on the local machine, I thought I'd start with
this problem first.

With these settings on OpenBSD 4.0, (generic+autoraid)
/etc/rc.conf.local
 lockd=YES
 portmap=YES
 nfs_server=YES
/etc/exports
 /home -alldirs -ro -network=10.0.1 -mask=255.255.255.0
/etc/sysctl.conf
 kern.usermount=1

For example
logged is as usera, on machine 10.0.1.201 (the server)
 uid=1000(usera) gid=1000(usera) groups=1000(usera), 0(wheel), 10(users), 20(staff)

$ mount_nfs 10.0.1.201:/home/usera/dir2share /home/usera/private/mnt
fails with
"mount_nfs: bad MNT RPC: RPC: Authentication error; why = Client credential too weak"

but
$ sudo mount_nfs 10.0.1.201:/home/usera/dir2share /home/usera/private/mnt
works fine


Any help would be appreciated.

More details:
I've tried to adhere to:
man mount
"A mount point node must be an existing directory for a mount to succeed
 (except in the special case of /, of course).  Only the superuser may
 mount file systems unless kern.usermount is nonzero (see sysctl(8)), the
 special device is readable and writeable by the user attempting the
 mount, and the mount point node is owned by the user attempting the
 mount."

by setting:
drwxr-xr-x  root   wheel  /home
drwxr-xr-x  usera  usera  /home/usera
drwxr-xr-x  usera  usera  /home/usera/dir2share
drwxr-xr-x  usera  usera  /home/usera/private
drwxr-xr-x  usera  usera  /home/usera/private/mnt


Thanks
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
NFS mount by non-root, Douglas Maus, (Wed Apr 25, 11:33 pm)
Re: NFS mount by non-root, Ted Unangst, (Thu Apr 26, 5:04 pm)
Re: NFS mount by non-root, Ben Calvert, (Thu Apr 26, 11:14 am)
Re: NFS mount by non-root, Tor Houghton, (Thu Apr 26, 6:54 am)
Re: NFS mount by non-root, L. V. Lammert, (Thu Apr 26, 11:19 am)
Re: NFS mount by non-root, Joachim Schipper, (Thu Apr 26, 9:43 am)
Re: NFS mount by non-root, Mike Erdely, (Thu Apr 26, 1:04 am)
speck-geostationary