Home Contact

Simon Lau

myLife. mySite. myBlog.

Dell XPS M1210 & Ubuntu 7.10 (Gutsy) – Mounting Network NTFS Folder

The advantage Windows has over Ubuntu is the ease of mounting network drives without installing any additional software and having it also auto-mount on startup. I know with some fancy hardware you can do the same on Ubuntu but I wanted some quick and easy. After some searching, I wrote my own script to do the trick.

#!/bin/bash
smbmount //192.168.0.103/E /home/simon/p5e3/ smfs -o guest uid=simon 0 0

I don’t fully understand what the stuff at the end means, but here’s what I know.

smbmount is the application that’ll do the a mounting

//192.168.0.1.103/E is the E drive on my PC with IP 192.168.0.103 that I want to mount.

/home/simon/p5e3/ is the folder I want to mount the networked drive to

smfs is the file system. I’m taking a stab at this. If you’re copying and pasting this for your own use, leave it as it.

-o guest all I know about this is that by declaring it as a guest, I get full access to the networked E drive. That includes read, write and execute. I believe you can only do this if the network drive is public and the permissions are set on the NTFS to be read/write/executable.

uid=simon that’s be my login

0 0 probably has something to do with permission.

You can make the procedure more complicated by adding logins and passwords but that’s too much for your average home user, at least in my opinon.

Once you’ve made your script in gedit, vi, nano or with your favourite text editor, you’ll want to save it and rename it to .sh. Then you want to make it executable by typing chmod u+x filename.sh.

I made this file on my desktop and I just double click and run it everytime you need to get access to your network. I tried adding it to start up, /etc/rd.local but I believe that happens before the network is initialized and thus skips over the mounting step.

Tags: , , , , ,