[Samba] postexec umount /cdrom doesn't work
Dai Yuwen
yuwen at micetek.com.cn
Mon Oct 28 05:33:01 GMT 2002
Hi, Dear All
This is my section of [CDROM] in smb.conf:
[cdrom]
comment = Samba server's CD-ROM
writable = no
locking = no
path = /cdrom
public = yes
;
; The next two parameters show how to auto-mount a CD-ROM when the
; cdrom share is accesed. For this to work /etc/fstab must contain
; an entry like this:
;
; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
;
; The CD-ROM gets unmounted automatically after the connection to the
;
; If you don't want to use auto-mounting/unmounting make sure the CD
; is mounted on /cdrom
;
preexec = /bin/mount /cdrom
postexec = /bin/umount /cdrom
When I open the service `cdrom' in a Windows box, /cdrom can be correctly
mounted. But after I close the Explore window, waiting for /cdrom being
umounted, it never umounted. I run `lsof /cdrom':
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
smbd 2161 root cwd DIR 22,0 2048 665600 /cdrom
smbd is still using /cdrom. In fact, it never quits. I have to kill smbd
manually.
My samba version is:
Version 2.2.3a-6 for Debian
Any idea? Thank you in advance.
Best regards,
Dai Yuwen
More information about the samba
mailing list