Sharing CD-ROM over Samba on Fedora 8 *solved*

Rick Stevens ricks at nerd.com
Fri Jun 6 19:35:37 UTC 2008


max wrote:
> Daniel Tweedy wrote:
>> I put this line in my /etc/fstab file
>>
>> /dev/sr0 /media/cdrom auto pamconsole,exec,noauto,managed 0 0
>>
>> The cdrom doesn't mount on bootup which I believe to be correct due to 
>> the noauto part.
>>
>> I played around with the samba config and found that the paths I was 
>> using for mount and unmount were incorrect, corrected the paths and 
>> now it mounts and unmounts fine.
>>
> 
> Cool. Just one question though, I am not trying to be confrontational or 
> anything, this solution automatically mounts and shares whatever is in 
> the cd drive? I can easily imagine putting a cd, say with backups or 
> other personal info, into the drive that I may not really want to share.

Then disable the automount options for the CD drive(s).  In Gnome:

	System->Preferences->Hardware->Removable Drives and Media

Uncheck "Mount removable media when inserted".  Note that from now on,
you'll have to manually mount the media, and there will NOT be a /media
entry for the drive to mount to.  To solve:

1. Create something like "mkdir /mnt/cdrom" and export that via Samba.
2. When you have a CD you want to share, "mount /dev/cdrom /mnt/cdrom".

----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                       rps2 at nerd.com -
- Hosting Consulting, Inc.                                           -
-                                                                    -
- Treat each day as if it's your last...a lot of crying and whining  -
-      usually gets you what you want!              -- Sam Sledge    -
----------------------------------------------------------------------




More information about the fedora-list mailing list