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@pwr.wroc.pl
I don't have the energy to check this out myself, but: The path specified in your share doesn't exist until you run the preexec. Are you sure a user can log on under this circumstance? Have you checked your logs? Have you run testparm? As a test, mount some other directory with a preexec command and see if that works, and keep directory R always mounted. Joel On Thu, Jul 03, 2003 at 12:31:28PM +0200, rybaczuk wrote:> 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@pwr.wroc.pl > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Why yuo need mount unmount seq? When you use one mountpoint to more users then system fails but when login another user to prepostexec share mount must fails. If you have more HD with part you can all it mount permanently to directory structure one partition to one mountpoint by SUSE mtab fstab and system start config. Then in samba you can use path to %... for connect user to its partiton. If is more many then you can use prepostexec but this is run as user of service in your example magda, then /windows/R must be owned by magda . Good job is write full path to commands /bin/mount.... Bye. ----- Original Message ----- From: "rybaczuk" <Marek.Rybaczuk@pwr.wroc.pl> To: <samba@samba.org> Sent: Thursday, July 03, 2003 12:31 PM Subject: [Samba] pre/postexec> Running system: SuSE 7.2 (kernel 2.2.4) & samba-3.0.0beta1. There is > coexisting Win(Millennium) system at the server (reason: many winpartitions> MUST be directly available at the central unit under windows afterrebooting> to windows). > > People connect their laptops (with small HD and Win2k SP2) to central unitand> 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 mountedpartitions> after logout or closed connections (users behave in this way). In manycases> 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 accordancewith> 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 asimilar> problem? > > FIRST ATTEMPT: I tried to employ pre/postexec mounting partition specificfor> 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@pwr.wroc.pl > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba