• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

How to auto mount cd-rom for samba

I set up samba and I share cd-rom using samba but I have telnet and mount it every time I have to mount it I have redhat 5.1 and there is automount but I don't know how to set it up  so please help me.
1 Solution
The better use is not to automount anything exept hard disks at boot...
Why that?
because if you accidently insert an audio cd for instance or a "bad" cd (or your CDROM suddenly crash or buirns....), then this will create a Kernel Panic during boot time...this means that propably you will have major problems with your Linux...so better off with automounts for CD's and Floppy's...you don't want your next question to be:
(Edited by Computer101)... i lost my Linux system....
do ya? :)

JBURGHARDTAuthor Commented:
I know how to mount cd-rom on boot, but I need info on automounting cd-rom when user want to use it and autoumount when is not needed. I am using good cd and no audio cd's
I have my CD-ROM set up for automount. I use the following two config files:

# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/auto   /etc/auto.auto  --timeout 60

cd      -fstype=iso9660,ro      :/dev/cdrom

With these config files and with automount running, I can cd to /auto/cd and see the CD-ROM. Once the CD has been inactive for a couple minutes, it unmounts.

Hope this is what you wanted...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now