This is often thought of as one of the more difficult aspects of trying to use Linux on a mostly-Windows network. Just a few short years ago this was truth. But now things are very different and sharing files and folders with Linux is as simple (if not simpler) than it is on a Windows machine. I will demonstrate how to share out folders using the GNOME desktop.
Of course sharing folders between Linux, Windows and Mac requires the help of a very powerful tool called Samba. Since I want to illustrate just how easy the process of sharing folders I won't go into the details of Samba - it can quickly become overwhelming. Instead I will show you how this is done from the perspective of an end- ser.
Naturally this can only work with the correct software installed. Samba is, obviously, a must. So let's get all of the software installation out of the way. Click on System > Administration > Synaptic Package Manager and then do the following:
- Search for "samba" (no quotes).
- Mark the following packages for installation: samba, libpam-smbpass, nautilus-share (these should pick up all the dependencies you need for installation).
- Click Apply to install.
That's it. You are now ready to set up file sharing.
Let's take a look at the steps for file sharing with the GNOME desktop.

Figure 2
Nautilus is the file manager for GNOME. Say you want to share out the folder ~/Documents. Click on Places > Home Folder and Nautilus will open in your ~/ directory (see Figure 2).
Step 2: Open up folder sharing settings.
Right click on the Documents folder. This will bring up a menu where you will find listed Sharing Options. Select that option from the menu.
Step 3: Configure sharing.
From the Folder Sharing window you will want to configure the following:
Share this folder: Enable this by clicking the checkbox.
Share name: Give the share a name.
Comment: Give the share a comment (this is optional, but useful in case there are similar share names on your network).
Allow others to create and delete files in this folder: Check this if you want to allow others to add and remove files in this share.
Guest access: If you want to allow everyone access to this share (even people without an account on your machine), check this box.
Once you have filled out all of the information click "Create Share." When you click this button a warning window will appear informing you that Nautilus needs to add some permissions to the target folder. Allow this (or the share won't work) by clicking "Add the permissions automatically."
When you have successfully shared out this folder you will know because 1) The icon on the share will change (the new icon will have a small hand below the icon indicating it is a shared folder) and 2) It will (after a moment) appear in your Windows My Network Places window. If the share doesn't show up there you can easily find it by entering \\IP_ADDRESS_OF_SHARE in the Explorer address bar, at which point the share will certainly show up. If you would like these shares to show up in My Network Places (in Windows) and they don't automatically, it means you might have to edit your /etc/samba/smb.conf file. But don't worry; it's so simple anyone can do it. Open up a terminal window and follow these steps:
- Enter the command sudo nano /etc/samba/smb.conf
- Search for the line workgroup = WORKGROUP
- Change the section of the above line (to the right of the "=" sign) to match the workgroup you are working with.
- Save and close the file by hitting
x followed by hitting the y key (for "yes"). - Restart Samba with the command sudo /etc/init.d/samba restart
That's it. Now your Ubuntu machine will be seen in the Windows "My Network Places."
To connect to this share on a Mac you would simply follow these steps:
- Open up Finder.
- Click
k. - Enter the IP address of your share and click Connect.
- In the new window select the share you want to connect to.
- Enter the authentication information and click OK.
You are now connected to that share. You can save this connection as a bookmark in Finder to make things easier.
But what about connecting to shared folders that reside on a Windows machine? This is equally as easy. In the GNOME desktop click Places > Connect to Server. When the new window opens up (see Figure 3) fill out the following:
- Service type: Windows Share
- Server: IP Address of machine with Share
- Share: Name of folder that is shared
Once you have that all filled out, click Connect and you should be connected to that shared folder. This, of course, will only work if said folder on the Windows machine is shared out onto the network.
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου