Home opinion-and-analysis Apexing the Linux learning curve Connecting Ubuntu Linux to a Windows server
×

Warning

JUser: :_load: Unable to load user with ID: 3246

Connecting Ubuntu Linux to a Windows server

In the last article I explained a little about how a user would see the (Ubuntu) Linux file system and where they'd expect certain files to be located. In this article I will talk about how to access files stored on network servers from an Ubuntu Linux machine.
I am not quite sure how to say this, so I will just come out and say it directly. Ubuntu 8.04 has a nasty little bug in it, that prevents you from browsing a "workgroup" and finding the shares on a remote (Windows based) server. You can access them quite happily and successfully, you just can't browse for them as can do from a Windows XP/Vista machine.

The following information is aimed at people who are at home or work but who are not using an Active Directory domain. I am assuming that you have a little workgroup setup or you have a nice little Network Attached Storage (NAS) device that functions as a Windows server and has shares on it. Ubuntu can connect to a Windows Active Directory setup, but I don't have one to try it out.

What follows is very much the same as "mapping a network drive" from XP or Vista. Just like in XP or Vista it's really quite easy to do.

Unfortunately, as you can't use the network browsing functionality (if you go to Places, Network Servers, Windows Network then nothing shows up), you will need to know the IP address of your server (which may well be an XP or Vista machine that has some shared folders on it) or your NAS device. If you didn't set it up yourself, then you might want to ask your network admin for this. You'd be expecting to see something like: 192.168.0.2 or 10.0.0.2. Don't worry if it is not exactly like that, it might be different numbers, that's OK.

You'll also need to know the names of the shares on the device to which you have access rights. For the sake of this exercise I am going to assume that the following shares exist: share1, music, applications.

If you want to make a one-off connection to a share, then go to Places, Home. In the Go menu, choose Location. In the Location bar you can directly type in: smb://serveripaddress/sharename. For example, smb://192.168.0.2/music. You'll get a usename and password prompt. Type those in and click OK. You might get a message that the share is not mounted. Go back to the Places menu and click on the name of the share on the left hand side, it will mount and you should be able to access the share.

Please read onto page 2 to find out how to make the connection permanent...


To make a connection to the shares on the server or NAS device, do the following: In the Places menu, click on Connect to Server. Use the drop down menu to select: Windows share.

In the Server box, type in the IP address of the server or NAS device.

In the Share box, type in the first of the shares you want to connect, for example, share1. Leave the folder box blank (we will look at this again in a minute). Note that in Linux folder names are case sensitive. So share1 is not the same as SHARE1 or even Share1. Your remote server may or may not be case sensitive, but it is better to just type in the share name as it appears on the remote server, so in this case it is share1.

Type in the username of the remote server authentication. For example, if on your Ubuntu machine you logon as "bob", but the remote server or NAS device has "user1" as the user for that share, then use "user1".

The next box in the Connect to Server box list is for the (Windows) Domain name. This is the bit that I said above that I couldn't test out but I am pretty sure that if you are on a Windows Domain trying to connect to shares on a Windows server, that's where you type in the Domain name and it will all work OK. If it doesn't, try this: leave the Domain name field with the correct name in it, but in the Username box, change the username to the following syntax: DOMAINNAME\username. So, if your Domain name is SMITH, and your username is john, then the Username box becomes SMITH\john. Not saying that this will work, but you can always give it a try. I'd love to hear back to find out if this is correct!

Finally you'll see the "Add bookmark" box. If you want to have the share bookmarked so you can go back to it easily, then tick the box and give it a unique name.

Click OK, and expect to get an error message that the share is not mounted. This is annoying but it will work, we just need to put in the username and password to get it mounted. Click OK on the message.

Please read onto page 3 for the last few steps...


Go to the Places menu and you'll see the bookmarked name that you created in the last step on the previous page. Click on that and you'll get a prompt for the username and password. The username should already have the username which you put in previously, so you should just need to type in the password. Choose how long you want the system to remember the password and click OK.

You should now be able to access the share!

So, what was that folder thing all about? If you want to go directly to a particular folder, go back through the Connect to Server routine again and fill in the folder box (remember the case sensitive thing!). In my case I want to have direct convenient access to my university work, so I have a special bookmark for that folder.

If you want to remove a bookmarked share, then go to Places, Bookmarks, Edit Bookmarks, highlight the bookmark and click Remove.

There is another method of connecting to remote server shares, but that is outside the scope of a Windows user transferring to Linux, which is the thrust of these articles. If you are interested in finding out more about this alternative method, use Google and start with a search for "/etc/fstab".

As always feel free to leave feedback and comments. I do appreciate them all.

LEARN NBN TRICKS AND TRAPS WITH FREE NBN SURVIVAL GUIDE

Did you know: Key business communication services may not work on the NBN?

Would your office survive without a phone, fax or email?

Avoid disruption and despair for your business.

Learn the NBN tricks and traps with your FREE 10-page NBN Business Survival Guide

The NBN Business Survival Guide answers your key questions:

· When can I get NBN?
· Will my business phones work?
· Will fax & EFTPOS be affected?
· How much will NBN cost?
· When should I start preparing?

DOWNLOAD NOW!