[clue-tech] Sharing samba with libpam-mount?

David L. Anselmi anselmi at anselmi.us
Sun Feb 1 18:22:20 MST 2009


Adrian F. Nagle, IV wrote:
> So I changed my mount argument to be the following: <volume user="*" 
> fstype="smbfs" server="jerome" path="srvshare" 
> mountpoint="/media/network" />
> 
> Now I do get a listing at /media/network.  However, I get a strange
> recursive link for the /media/network/nagle_ext1 directory.

So on jerome you have:

/srv/nagle_ext1 -> /media/nagle_ext1

When Windows clients see that link it gets followed automatically.  So 
on Windows it looks like a directory (sorry, folder).

Linux clients can understand links so samba tells them that it's a link. 
  But of course on the client /media/nagle_ext1 doesn't exist.

Solutions:

- on the server you can set unix extensions = no in smb.conf

- on the client you can do echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled 
before you mount the share (not sure how convenient that is with 
libpam-mount)

(These both have implications for the uid/gid of files shared from the 
server.)

- (on the server) instead of using a link to /media/nagle_ext1, mount 
the drive at /srv/nagle_ext1 (this can be done regardless of where else 
the drive is mounted)

Personally I'd go for the last.  There's no reason to use links instead 
of mount points in Linux and that allows you to use links correctly if 
you decide you need them for something else.

Dave


More information about the clue-tech mailing list