How to map network drive on Ubuntu 9.04/9.10

Sponsored Link
This tutorial expalins how to map a network drive in ubuntu 9.04/9.10.This is very useful if you are trying to map your windows machine/another linux machine drive on to your system.

Preparing your system

First you need to create a directory where you want to mount

sudo mkdir /media/share

Now install cifs-util package this provides support for cross-platform file sharing with Windows, OS X and other Unix systems.

sudo apt-get install cifs-utils libnss-winbind winbind

Now edit the nsswitch.conf file

sudo gedit /etc/nsswitch.conf

Change the following line from

hosts: files mdns4_minimal [NOTFOUND=return] dns

to

hosts: files mdns4_minimal [NOTFOUND=return] wins dns

Save and exit the file.

Now restart your ubuntu system.

Mapping network drive

Now you need to edit the /etc/fstab file and you can take backup before editing the live file.You need to create credential file and also need to get the UID and GID values.Create smb password file using the following command

gedit ~/.smbpass

Add the following details

username=geek
password=newworld123

Save and exit the file.

Note:- Replace username and password with your own

You can get UID and GID details using the following command

id ubuntugeek

Note:- Replace ubuntugeek with your logged in userid

We need to edit the fstab file using the following comamnd

sudo gedit /etc/fstab

Add below command in one line and save it.

//192.168.3.55/share /media/share cifs credentials=/home/ubuntugeek/.smbpass,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

Replace the bold ones with your own details.

Run the following command

sudo mount -a

you’ll get the network share mapped in Unity Launcher and Nautilus file browser.This will map your drive permanently.

Sponsored Link

Related posts

One thought on “How to map network drive on Ubuntu 9.04/9.10

Leave a comment

Your email address will not be published. Required fields are marked *