[Samba] pre/postexec
rybaczuk
Marek.Rybaczuk at pwr.wroc.pl
Thu Jul 3 10:31:28 GMT 2003
Running system: SuSE 7.2 (kernel 2.2.4) & samba-3.0.0beta1. There is
coexisting Win(Millennium) system at the server (reason: many win partitions
MUST be directly available at the central unit under windows after rebooting
to windows).
People connect their laptops (with small HD and Win2k SP2) to central unit and
samba offers shares with Linux accounts. However, there are many win
partitions (previously created for any user) at the same computer equipped
with many HD (6 at present time). It is not possible to mount all win
partitions - too many. Usual mounting scripts entails left mounted partitions
after logout or closed connections (users behave in this way). In many cases
the same (already mounted and left partition) is used by few users.
PROBLEM: is it possible to create specific share, mounting some particular
windows partition (from another HD at the same computer) in accordance with
user during logon and UNMOUNT it during logout or closed connection? Does
anybody has an idea or knows a method how to do this or he has met a similar
problem?
FIRST ATTEMPT: I tried to employ pre/postexec mounting partition specific for
a given user. The exemplary generated share is as follows:
[Win_mag]
comment = Zbiory Win na Marku
path = /windows/R
valid users = magda
read only = No
browseable = Yes
preexec = mount -t vfat /dev/hdf5 /windows/R
postexec = umount /windows/R
According to fstab everybody can mount this partition
/dev/hdf5 /windows/R vfat noauto,user 0 0
The share is visible as empty but the pre/postexec script hasn't been
executed. Is something wrong with the above configuration?
I am not very familiar with more advanced features of samba configuration
(half-newbie). Everything else cups printers, other shares being detaily
described in man/how-to files work excellent.
Thank you in advance for any byte of information,
Marek Rybaczuk
___________________________________________________
Marek.Rybaczuk at pwr.wroc.pl
More information about the samba
mailing list