Doing the Samba NTFS Shuffle

Posted on Thursday 30 October 2008

Dumb title – yeah I know – but I thought I would try to help those just browsing titles to get an idea what the article may be about ( yet another one of those “changes” that I am implementing – we’ll see how well this one goes…) By the way, this article is pretty technical for those who aren’t interested in such things…

So, riding a high from my WordPress experiences yesterday, I decided that it would be time to tackle my Samba and NTFS sharing issues with WIndows with two goals in mind:

  1. To be easily share files from my Ubuntu machine with other Windows computers within my network
  2. To be able to access shared Windows folders within my network with my Ubuntu machine

A bit of background here… While I have had years of experience with ( now quite older versions of ) Unix and Linux, I’ve never had the opportunity to utilize, let alone become acquainted with sharing Unix files across a Windows network and have never had the opportunity to try and mix/share folders and processes between Windows and Linux….. so this is all really quite new to me!

I have tried previously to tackle this issue ( with limited success ) and have always tried to do it the way I did it before, by using the command line or terminal access. So imagine my surprise when, after searching on the network for other ideas, I found a You-Tube video that showed how to do it all ( well a good portion anyways ) using graphic tools already built into the Ubuntu box!

The video was a little dated ( working with Version 6.01 while I had 8.04 ) but similar enough that I could follow along and discern or figure out the differences. The really, REALLY amazing thing is that it worked first time! Not that it shouldn’t have, but that it was so easy!

I have converted and updated the original video steps here for you, but you can also go directly to the video and watch along if you like. You will find it here – www.youtube.com/watch?v=Ad17kma8rNM. I give Rich who  originally ( I assume ) posted this video on www.pcmechtv.com , full credit for all of this. I’m just transposing and updating his steps to Ubuntu 8.04.

By the way, pcmechtv appears to be a fairly affordable online school for those who want to learn more about actually managing and supporting computers. Not only do they have a commercial system, but they also make many of their tidbits and assistance available for anyone to view – a class act. You might want to check them out!

How to Enable Windows Shares on Ubuntu 8.04

Step 1 (Installing Samba and NTFS)

  1. Install Samba and NTFS-Tools. My preferred way of installation is to open up a terminal window ( From the drop-down menu click on Applications -> Accessories -> Terminal ( I use the -> symbol to indicate the next button in the next drop-down menu )and type “sudo apt-get install samba” and enter and then when prompted enter the administrators password then do the same for ntfs-3g and ntfs-config ( leave this window open for later. ) Or…
    1. Your other more graphic route is to go to your package manager. In my case you would go to the drop-down menu: Click on System -> Administration -> Synaptic Package Manager.
    2. Select All on the top left corner and then in the larger window, scroll down and select samba and ntfs-3g and ntfs-config by clicking in the small box for ntfs-3g and ntfs-config.
    3. In both cases, you will be asked to mark the file for installation by clicking on the “Mark” arrow that pops up.
    4. When all the files have been selected, click on the “Apply” arrow on the top menu then click “Apply” again on the pop-up box. Enter the administrators password if requested.
  2. Once the installation has completed, you may close the window.

Step 2 (Naming your Ubuntu Computer)

  1. From your drop-down menu: Go to System -> Administration -> Network
  2. This will open the Network Settings Tool: Click on Unlock and enter the administrators password
  3. Click on your wired or wireless connection ( as appropriate for your system )and select the “General” tab.
  4. Enter or make sure your computer name is entered. Domain names are not usually necessary in home networks. For business computers who have an internet domain it would be entered here as well.
  5. When you are done click close

Step 3 (Setting up Samba for Sharing)

  1. This is probably the trickiest/hardest part and now you definitely have to use the terminal and command-line – sorry. If you still have your terminal open – great but if not… From your drop-down menu: Go to Applications -> Accessories -> Terminal.
  2. In the terminal window type in “sudo gedit /etc/samba/smb.conf” and hit enter. You may need to enter your administrators password at this time. A graphic editor will open your samba configuration file.
  3. Click on Search -> Find at the top of the editor menu and look for workgroup. When it is found change the work group name eg. workgroup = MSHOME to whatever your current Windows Workgroup name… for example mine would be workgroup = MYLAN
  4. Go up to the top of the editor to again Search -> Find and look for browseable. When it is found ensure that there is no semi-colon “;” at the beginning of the line. Also ensure, or change the line to read browseable = yes
  5. IF you want full read and write access to systems next scroll down, or again use the search facility to find the line with writeable in it. Again ensure that the semi-colon is removed and that “yes” is entered in after the equal sign. e.g. writeable = yes
  6. After your changes have been made, go to the top of your editor and click on File -> Save. Once the file has been saved you may click on File -> Quit. Please leave your terminal window open!

Step 4 (Create a Samba User and Reload Samba)

  1. In the terminal window. Type “sudo smbpasswd -a username ( this is the user who will be accessing and sharing files ) On a single user system this would usually be your account name.
  2. You will be prompted to enter and retype a password for this user. This is the user and password that you will need to access your shared Ubuntu files across the network.
  3. Now you need to “reload” the samba server to have all your changes take effect. Still in the terminal window, type “sudo /etc/init.d/samba reload” once more entering the administrators password if asked.
  4. Once you see the “[ok]” message that the samba server has reloaded ( on the far right of your terminal window ) you can leave the terminal window by typing “exit
  5. The hard parts are now done!

Step 5 (Accessing Shared Windows Files from Ubuntu)

  1. To access other shared folders within the workgroup you go to your Ubuntu drop down menu and click on Places -> Network.
  2. Find the network and/or computer that you want to access the shared folders on and click on it to find the what has been shared. From there you can then manage the files as you see fit.

Step 6 (Setting up Shared Files in Ubuntu)

  1. To share your Ubuntu files with your Windows Workgroup computers click on “Places” on your Ubuntu menu and select the location you wish to share. For example if you are going to share a folder within your own Ubuntu account ( this is the most normal way of doing things )
  2. So for example go to Places -> Home Folder and a file manager will open with all the files and folders in that location.
  3. Select the file or folder you wish to share and “Right Click” on it. A menu will pop up and at the bottom it will have an option for “Sharing Options“. Click on that.
  4. A window will pop up and from there you click on the share button and may also, if you wish others to be able to write to it, click on the button to allow others to write to it.
  5. Click on the “Create Share” button when ready. Note that if you have allowed write access that the permissions on the file/folder need to be changed and a window will pop up giving you a reminder of this and confirming that you do want to give write access.
  6. Continue this procedure for all files and documents that you wish to share. When you are done, you may exit the File manager by clicking on File -> Close at the top.

Step 7 (Accessing Shared Ubuntu Files in Windows)

  1. This is the final check. To access the file or folder from your windows workgrouped computer. If you aren’t sure how to do this…
  2. Open your Windows Explorer. Usually this is done by clicking on Start -> Programs -> Accessories -> Windows Explorer
  3. Within Windows Explorer click on My Network Places -> Entire Network -> Microsoft Windows Network -> Workgroup Name (e.g. MSHOME)
  4. This will list all the computers in the Windows Workgroup, and your Ubuntu computer (as you named up in Step 2 ) should now be listed as one of them.
  5. Click on your Ubuntu computer and the shared files and folders will be available for manipulation and/or access as you originally set up before in Step 6. Note that you will probably be asked for the name and password the first time (this is what you set up in Step 4. )

After completing all the above steps you can now share ( as I did ) your files from Ubuntu to Windows, and Windows to Ubuntu. Pretty sweet indeed…

End Article

Please Add Your Comment. PLEASE NOTE: Your comments WILL be held until authorized by the webmaster.


Google
 
css.php