How can I share my DVD drives?

Asked by paul n cindy

My kids are home schooled and I just built this Ubuntu Linux "server" so I can share my DVD drives with their windows based diskless mini-laptops across our wireless network. I haven't been able to find a way to share them. Can someone who knows how to do this help me out? Thank you in advance.

Paul

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo apt-get install samba

gksudo gedit /etc/samba/smb.conf

find:

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes

delete the ; characters and change /cdrom to /media/cdrom0 so that it looks like this:

# A sample share for sharing your CD-ROM with others.
[cdrom]
   comment = Samba server's CD-ROM
   read only = yes
   locking = no
   path = /media/cdrom0
   guest ok = yes

a little further down find:

; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

and do the same again so it reads:

   preexec = /bin/mount /media/cdrom0
   postexec = /bin/umount /media/cdrom0

save the new file and close gedit, then i nterminal run:

sudo /etc/init.d/samba restart; hostname

(make a note of the output of the hostname command)

The CD drive is now shared, you access it with

start -> run
then type:
\\<hostname output>\cdrom

e.g.

\\fileserver\cdrom

and the data will be accessible from a windows system. If the mini pc's are Linux based simply open the file manager (most likely nautilus) and in the address bar type:

smb://<hostname output>/cdrom

e.g.

smb:\\fileserver\cdrom

Done

Revision history for this message
paul n cindy (azcoyotehunter) said :
#2

Thanks for answering my question, however

I tried the very first line:

sudo apt-get install samba

and got this message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package samba is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  smbclient samba-common
E: Package samba has no installation candidate

I can't get Samba for some reason. I am running Ubuntu 9.04.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

hmm weird, try:

https://help.ubuntu.com/8.10/internet/C/networking-shares.html

If you share /media/cdrom0ut will share the CD drive

Revision history for this message
paul n cindy (azcoyotehunter) said :
#4

Ok. First off, again, thank you very much for the help. I installed Ubuntu 8.10 from scratch over the existing version, which was the 9.04. I got Samba and configured it correctly. However, I want to share more than just one of my DVD drives. I thought I could probably edit the smb.conf file to say;

    path = /media/cdrom0

then have the next line say:

   path = /media/cdrom1

and do the same with the :

   preexec = /bin/mount /media/cdrom0
   postexec = /bin/umount /media/cdrom0

just by adding the lines:

   preexec = /bin/mount /media/cdrom0
   preexec = /bin/mount /media/cdrom1
   postexec = /bin/umount /media/cdrom0
   postexec = /bin/umount /media/cdrom1

However, this didn't work. So, I edited the conf file to put it back to just sharing the singe drive.

Is there a way for me to share more than 1 of my DVD drives?

Also, when accessing the DVD on the Linux server from the laptops, the response is very slow. Is there anything I can do about that?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

You can uncomment the line that says:

socket options = TCP_NODELAY

and restart the samba service

To share both you will need to have 2 entries in smb.conf

E.g.

[cdrom0]
   comment = Samba server's CD-ROM 0
   read only = yes
   locking = no
   path = /media/cdrom0
   guest ok = yes

[cdrom1]
   comment = Samba server's CD-ROM 1
   read only = yes
   locking = no
   path = /media/cdrom1
   guest ok = yes

Can you help with this problem?

Provide an answer of your own, or ask paul n cindy for more information if necessary.

To post a message you must log in.