Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I used to use samba to share my CD's including audio CD's. I used to mount them "/mnt/cdrom" or "/media/cdrom" with a entry in "/etc/fstab" and entry in "smb.conf" to share that location but now!

I put the audio CD in, and the PC auto mounts(may be? it appears in the file broswer) it but where? I have googled and found "/username/.gvfs/nnnnnnnnn" there are problems with this.

The path changes with each user depending on who is logged in at the time.

The path does not show in the standard ways (cat /etc/mtab)

The path can not be put statically into smb.conf because it changes see above on and on and on

So how to I share the audio CD I put in to the PC?

share|improve this question
add comment

2 Answers 2

Ah Linux, where there's usually an answer, but it's different for everyone. Maybe I can get you started. Ubuntu 12.10 picked up an upstream change that automounts media in a directory that changes by user ID. (Justification for the change can be found at freedesktop.org.) You want a static location shared by all users.

The quick and dirty fix is to symlink all your users' mount points back up to the shared directory, something like sudo ln -s /media/$USER/* /media/. See How to configure the default automount location? Note a comment by rocko in that reference claiming a better, general solution is coming in Ubuntu 13.04.

In 12.10 a solution better than the symlink hack is to arrange a static mount point in /etc/fstab. In my case, I have a USB CDROM drive, and this works as far as I've tested it:

  1. Find the symlink for the CDROM device in udev rules: cat /etc/udev/rules.d/70-persistent-cd.rule in my case, there was a series of entries for my PLDS_DVD device including one with SYMLINK+="cdrom", meaning the device shows up at /dev/cdrom.
  2. Create a suitable static mount point: sudo mkdir -p /mnt/cdrom
  3. Link these things together in /etc/fstab with a line like this: /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide
  4. Create a Samba share using path=/mnt/cdrom (you know how to do this already)

I'm just piecing things together here, and honestly I haven't tested this whole series in exactly this way, but you should be able to share the CD after some user, any user, manually mounts: mount /mnt/cdrom.

share|improve this answer
add comment

http://aarklonlinuxinfo.blogspot.nl/2011/01/cd-rom-sharing-via-samba.html If you change the cd(in the share), then on the other pc you need to unmount, and mount de share again, then you see the new cd. In ubuntu with gigolo it is easy.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.