We have a fairly solid use of network file servers in our district. We can create bookmarks so that students can access the drive quickly, but I wanted to see if we could have the same convenience of our windows mapped network folders. I have added a couple of scripts to automount a public student folder. This also means that there is no need to do any Libre Office work around, as LibreOffice can directly save into the server with this setup.
First I booted with -generic instead of -aufs to make the changes permanent. Then I made sure samba and smbfs was installed:
sudo apt-get install samba
sudo apt-get install smbfs
Then I created a folder to mount the network folder
sudo mkdir /media/server
Then in the file:
/etc/network/if-up.d/mynetstart
I added:
mount -t smbfs //our-server/folder /media/server -o uid=1000,gid=1000,umask=0022,username="generic-student-account",password=""
This means that when a network connection is established the server will be mounted. This works fine, but it wasn't shutting down due to the fact that the wireless was turning off before the folder was unmounted.
So I created a file called S15umount in /etc/rc0.d:
sudo gedit /etc/rc0.d/S15umount
with this text:
#!/bin/sh
sudo umount /media/server
and then made the file executable:
sudo chmod a+x S15umount
This works more times but not all the time, so it still hangs on shutdown. Any ideas or suggestions on how to fine tune this auto-mount process would be great. Once it is working perfectly I will post to the wiki.