How to Mount Windows Shares Permanently on Ubuntu 9.10

As I wrote here, I recently got a NAS server and wanted to mount its shared folders permanently. After going through some forum threads, reading tutorials, asking around and trying stuff like installing packages that might not be necessary (like nfs-common, it didn’t change anything afterwards), I managed to mount my Seagate BlackArmor NAS shares permanently.

So, here’s what I did:

I found my user and group id by typing “id” into a terminal, as I needed them later for adding them to fstab. Most of the tutorials or help manuals suggested using the name of the server from your local network. It didn’t work this way. So I had an idea: to use the IP instead of the server name. It came after seeing this forum thread, which I found after looking for the CIFS VFS: cifs_mount failed w/return code = -22 error on the web. I could see the most recent system errors by typing into a terminal

dmesg | tail

The next step was to modify /etc/fstab. I did it by using gedit as root, using sudo gedit /etc/fstab.

I added the following line to /etc/fstab:

//192.168.0.65/privatefolder /media/servfolder cifs username=xxxxx,password=yyyyyy,uid=1000,gid=1000 0 0

The final step was to type:

sudo mount -a

and I had the shares mounted permanently. I gave up on using another file for storing the credentials, as I am the only user of this computer and I don’t think I’m going to face any hacking threats soon.


Ubuntu – Help files written by geeks for geeks

I recently got a NAS server and tried to map a network drive in Ubuntu. I was very happy about it and wanted to automate the mounting of the network shares. As there’s no GUI for doing this – or even a simple way as Windows has, the “map network drive” command – I had to go to the console.

So I asked for help through the almighty Google. I found this wiki page, this forum thread and this help page. The help page is the hardest to understand. It looks like it was written by geeks for geeks. It seems that the open source community hasn’t yet learned a valuable lesson: not everyone has your experience when it comes to configuring servers, writing bash scripts or whatever.


A few short facts about writing on the web

Pen and Paper - Moleskine Notebook

Short facts about writing on the web:

1. Twitter – None of your tweets will be remembered in a few days. On Twitter, everyone seems to have ADHD and a short attention span, including me. :)

2. Tumblr - Everyone’s busy to reblog others, you’ll probably receive a few “likes” for something you wrote but you’ll remain just another Tumblr user.

3. Your blog – This is probably the place where content lives a longer life, as you have more control over it than on Twitter and Tumblr.

4. Facebook – Uhm, why am I talking about Facebook? There’s no writing there!

Everything on the web is ephemeral. Use pen and paper for your most important things and use the web as a backup solution. Keep what you write on a service like Zoho, just in case you lose your notebook.


|