Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2011 23:34:50 +0100
From:      "Marek Salwerowicz" <marek_sal@wp.pl>
To:        <rmacklem@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   NFSv4 and pam_mount - mounting user home directories.
Message-ID:  <C90EA7CCF380432BA1346F64D2C97649@marekdesktop>

next in thread | raw e-mail | index | archive | help
Hi,

1. I have a NFSv4-enabled server with /etc/exports like:
V4: / -sec=sys
/home/stud -sec=sys

/etc/rc.conf:

nfs_server_enable=YES
nfsv4_server_enable=YES
nfsuserd_enable=YES

Is it possible to run ONLY NFSv4 server (without NFSv3 compatibility) ?

2. On a client station I installed pam_mount module in order to mount home directory from server automatically during logging in to 
station.
I would like to mount it via NFSv4.

In pam_mount.conf.xml I inserted:
<volume fstype="nfs" server="free" pgrp="stud" path="/home/stud/%(USER)" mountpoint="/home/stud/%(USER)" />
<volume fstype="nfs" server="free" pgrp="prac" path="/home/prac/%(USER)" mountpoint="/home/prac/%(USER)" />
<nfsmount>mount_nfs -o nfsv4 %(SERVER):%(VOLUME) %(MNTPT)</nfsmount>

And it  works, but:

On a client station every user can be root, and I don't want even root to be able to mount user's home directories without giving a 
password (via mount_nfs command)- is it possible?

After mounting there is a strange UID and GID:

ls -la
total 472
drwxr-xr-x  10 32767  32767       1024  8 sty 23:00 ./
drwxr-xr-x   9 root   wheel        512  1 wrz  2009 ../
-rw-------   1 32767  32767          0 12 cze  2010 .Xauthority
drwxr-xr-x   3 32767  32767        512 12 cze  2010 .cache/
-rw-------   1 32767  32767      68693  8 sty 21:11 .hist
-rw-------   1 32767  32767          0 11 cze  2010 .history

the UID should be 700.

-- 
Marek Salwerowicz 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C90EA7CCF380432BA1346F64D2C97649>