On Mon, Sep 06, 1999 at 09:21:25PM -0400, Alec Smith wrote: > I've got a Debian 2.2 machine running Samba 2.0.5a that I'd like to share > a CD-ROM drive from. Basically I'd like to have the CD-ROM mount and > unmount before and after usage. So far I can get the drive to mount > automatically using the exec option in Samba, however no files are visable > from Windows -- Only if I TELNET to the machine and look at the mount > point. > > Does anyone have a suggestion on how to set the exec and postexec options > so they'll actually work with a Debian system? I suggest to use autofs:
Install the autofs module by including a line autofs in /etc/modules and say # modprobe autofs Now install the autofs tools with apt-get install autofs Finally Put a line like the following in /etc/auto.master: /m /etc/auto.removable -t5 and create a file in /etc with ------------ snip -------------- # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage cd -fstype=iso9660,ro :/dev/scd0 floppy -fstype=vfat,quiet,gid=25,umask=002 :/dev/fd0 zip -fstype=vfat,quiet,gid=25,umask=002 :/dev/hdc4 ------------ snap -------------- You need to modify the devices to suit your environment of course. Now create the mountpoint # mkdir /m and start the autmomounter with # /etc/init.d/autofs The path to your cdrom is now /m/cd, which is what you will need for the "path" setting in /etc/smb.conf I never could make the sambe exec option work and this has the added bonus to work for local users too and also for several users at once. Nils -- Plug-and-Play is really nice, unfortunately it only works 50% of the time. To be specific the "Plug" almost always works. --unknown source
pgpasqJrd09gn.pgp
Description: PGP signature