geekesque - home page

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.


|