Sunday, December 7, 2008

Map your Windows shared folder into Linux

ref: http://randomspark.wordpress.com/2007/09/02/map-your-windows-shared-folder-into-linux-kubuntu/

This tasks seems simple enough if it were done on a full Windows network. The idiot-proof privilege of mapping a network drive through the Explorer interface will take you only a few seconds (given that you know your away around the Explorer right-click menus of course). The ‘Map Network Drive’ feature still hasn’t made its way into today popular Linux desktop distros (like K/Ubuntu), but it is possible to actually map your shared folder by “mounting” it as an extra drive.

First off, make sure that you have the latest samba and smbnfs packages installed. You can get them by doing the following command if you don’t have them yet:

$ sudo apt-get install samba smbfs

You need the samba packages in order for you to access Windows-based networks (workgroups, for example). This lets you browse through those shared folders in Windows computers on your network.

smbfs lets you mount an smb share on your Linux system, which makes it look like its an extra drive. Kind of like a “mapped network drive” in Windows.

After installing those two, try browsing through your network’s shared folders. Click on ‘Remote Places->Samba Shares’, you should see a list of all the Windows workgroups available on the network. You can also try typing in (at the file browser’s address bar) the IP of the computer where the shared folder is, in the following format

smb://[ip_of_remote_pc]/yoursharedfolder (egs. smb://10.10.1.23/documents)

or

smb://[ip_of_remote_pc]/ (egs. smb://10.10.1.23/)

Now to mount your Samba network share, type the following commands (as normal user):

$ smbmount //server/share /home/user/mount-point -o username=yourusername,password=yourpassword

That should map the shared folder as a local drive.

Mount smbfs
掛載遠端磁碟機 on ubuntu 的方法:
mount -t smbfs -o iocharset=utf8,codepage=unicode,unicode //遠端主機名稱/資料夾 /本機掛載目錄

it is the same as add a Common Internet Filesystem (cifs) by using webmin!

No comments: