samba shares with supermount

Jonathan Hutchins hutchins at opus1.com
Thu May 2 11:51:43 CDT 2002


Tarun,

I'm afraid that it's a bit of a shambles.  I think I tried to implement
supermount, and failed.  What I really have is the old  autofs system, and
I'm not positive which pieces are essential.

I know you need /sbin/mount.smb from samba-client, and a working samba
share.

In /etc/mtab I have:

/dev/hda1 / ext2 rw 0 0
none /proc proc rw 0 0
none /dev/shm tmpfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
automount(pid640) /ntserver autofs rw,fd=5,pgrp=640,minproto=2,maxproto=3 0
0

I don't believe that last line is actually significant, but I'm not certain.
Having a pid in the mtab is strange, and there is no pid 640.

/etc/auto.master:

# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
#/misc  /etc/auto.misc  --timeout 60
/ntserver /etc/auto.ntserver --timeout 60

/etc/auto.ntserver:

apps -fstype=smb,username=machine,password=password,dmask=777,fmask=777,rw
://ntserver/apps
data -fstype=smb,username=machine,password=password,dmask=777,fmask=777,rw
://ntserver/data
ftp -fstyoe=smb,username=machine,password=password,dmask=777,fmask=777,rw
://ntserver/ftp
library
-fstype=smb,username=machine,password=password,dmask=777,fmask=777,rw
://ntserver/library
music -fstype=smb,username=machine,password=password,dmask=777,fmask=777,rw
://ntserver/music

There is a machine account on ntserver.  Clearly, there are security
implications in the choice of dmask and fmask that should be considered
carefully on a public server.  I believe this configuration allows any user
to mount, although I haven't really tested it.  To mount, you simply do # ls
/ntserver/data or something.  # ls /ntserver will be empty unless someone
has recently accessed something beneath it.

Linux Magazine, I think, did a recent article about setting up a CD jukebox
using automount, and I think what they did is create a directory of symlinks
back to the automount directory, so by doing # ls /symlinkdir you got a list
of the possible mounts.

Most of this was gleaned from a couple of HOWTOs about setting up a server
for home networking, and from studying the relevant portions of the samba
man pages.




More information about the Kclug mailing list