I use Kububtu 13.04 and on the Kubuntuforums.net I have placed the following question. Since the forum is pretty quiet I thought I better give it a try here.
I pasted the whole conversation which exists so far so you know what has been done already.
When I have installed Kubuntu 13.04 with a fresh installation, what do I need to do to make autofs work?
Please be as specific as possible because I can't get it to work.
What I want is to automount 2 disks in 2 other computers and to shutdown this mount after a period of inactivity (let's say 60 sec).
Which packages do I need to install and how do I setup this automount?
I have 4 files in /etc already: auto.master auto.dea auto.laptop and auto.playonhd. What exactly do I need to write into these files when I want to use samba? What do I need to install to make Samba work?
I have a shared folder: /home/user/shares. Do I need to manually make the subfolders in there or will they be made automatically?
Questions Questions Questions
I know, but I need answers. Who can give them to me and please be very detailed. Thank you so much.
I've never tried to use autofs, but here's a good wiki how-to
My comment to that answer:
Thank you for pointing me to the wiki page. This helped me, it now works (again). Last year or so I also had it working but installing new OS'es prevented it.
When you say you don't use it, then how do you setup your network? How do you make connections to other computers?
I started using autofs because of the following situation:
I use computer A. In fstab I mount a partition on a disk in computer B. This works and I can read/write files in B.
Then B is suddenly switched off. Now my file-manager hangs because of the missing connection.
Before I can do something again in computer A I need to unmount the drive in computer B manually.
With autofs this is done automatically after a timeout. Result: no hanging computer A anymore.
Anyway, thanks again, you really helped.
I have a full time server. I mount it to my desktop and media player using nfs with bg (background) and soft options so it doesn't drag down the network. Basically, it sends the message "not available" but continues to try and connect is the background. Frankly, since it's my network I rarely have this happen. On our laptops, I also use no-auto so if we're not at home it doesn't try and connect automatically. It waits for a request from the user.
I was a little interested in autofs after reading a bit though. I can see where it has some applications. In my case, I seem to be OK so no reason to fix it if it ain't broken - know what I mean?
My answer to that:
Yes, when your server is on 24/7 you don't get the symptoms I get when I switch off a computer from which a drive is mounted in my working computer. The thing totally hangs. So I looked for a way to prevent that and found autofs.
Yesterday I wrote it worked, but I shouted too early. Yes, it does work for one computer, a windows computer. With my Linux laptop and my Linux operated media-player it is still a no go.
I have one auto.master file and three map files.
The contents are:
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
# Include /etc/auto.master.d/*.autofs
# Include central master map if it can be found using
# nsswitch sources.
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
/home/jan/shares /etc/auto.dea --timeout=30 --ghost
/home/jan/shares /etc/auto.playonhd --timeout=30 --ghost
/home/jan/shares /etc/auto.laptop --timeout=30 --ghost
(this is the windows PC which works using autofs)
Dea -fstype=cifs,rw,username=guest,password=,uid=1000,i ocharset=utf8 ://192.168.2.11/dea
Laptop -fstype=cifs,rw,username=guest,password=,uid=1000,i ocharset=utf8 ://192.168.2.22/Home-Jan
When I click /home/jan/shares/Dea I see the contents of the user partition Dea in the Windows PC. Great
PlayonHD -fstype=cifs,rw,username=admin,password=,iocharset= utf8 ://192.168.2.12/HDD1
When I click /home/jan/shares/Laptop I get a message: folder /home/jan/shares/Laptop does not exist. Same for the playonhd.
The folders don't exist but they are there: I can click on them.
What is wrong here? Or should I use nfs instead of samba to connect to the Linux operated machines? Samba always worked so why not now? Several versions of my operating system ago it did work, now I can't get it to work anymore.
Who can help? Please.