Networking: Sharing folders between Windows and Linux using Samba
In this section, we will do the opposite to the previous section. We will share a folder (in this case an entire mounted drive on Linux and connect to it through Windows. There is reason to this madness: I'm in the process of converting M2TS movies to AVI format so need access to Linux ffmpeg and other free open source utilities to do this with.
Yet I want to view and play the videos through my Windows workstations without having to copy files all over the place. So let's begin:
WINDOWS : Mounting Linux shared folders on a remote Windows System
STEP | DESCRIPTION | COMMAND |
1 | Verify installation and commands exist. |
Visit the LINUX : Mounting Windows shared folders on Linux and refer to Step 1.
|
2 | Create a folder and/or determine one to share. |
Use something similar to:
# mkdir /mnt/LinuxHomeVideos to create a folder if you do not already have one in mind to share. In this case I connected and formatted a new hard drive using the EXT filesystem. Here's how I went about doing that: LINUX / UNIX: Adding a new SATA harddrive using parted instead of fdisk.
|
3 | Specify the above folder you created in the SAMBA configuration file. |
The SAMBA configuration file resides in /etc/samba/smb.conf. An entry such as below can now be added to allow for sharing:
/etc/samba/smb.conf NOTE the parameters used. For example, if the folder should not be writable from Windows, use writable = no. This should be analogous to the Windows check box option Allow network users to change my files.
|
4 | Set the SAMBA password. |
Set the password for the SAMBA root user account:
# smbpasswd -a <USERN> This is how we will authenticate from Windows.
|
5 | Test the configuration file to ensure no syntax errors. |
Run the SAMBA configuration test command:
# testparm
There is a WARNING above. See below Q&A for a resolution. A successful message will resemble this:
# testparm
|
6 | Restart the SMB service. |
Use: # service smb restart OR # /etc/init.d/smb restart
|
6 | Verify that you can see the share. |
Run below command. If the SAMBA server is on 192.168.1.1 the you can run this command on 192.168.1.1:
# smbclient -L 192.168.1.1
Sharename Type Comment
|
7 | On Windows PC map the Linux shared folder. |
On the Windows PC, follow these steps:
In Windows Explorer, you should now see a mapping similar to this:
|
8 | Verify your configuration. |
In Windows, create a file on the shared drive then on Linux remove that same file. This would constitute a basic Read/Write test.
|
9 | Help! I've run into problems and I can't get past them. | Check the Q&A section below or simply use your browser's search feature to search this page for the error, warning or issue you see. |
Click below for next page…
[…] Tom Kacperski wrote an interesting post today onNetworking: Sharing folders between Windows and Linux using SambaHere’s a quick excerpt […]
[…] Networking: Sharing folders between Windows and Linux using Samba […]
[…] Networking: Sharing folders between Windows and Linux using Samba […]
[…] NT_STATUS_UNSUCCESSFUL Setting up rules in the firewall between server/client for ports 445,139 etc might do it for your […]
[…] it's all said and done then shared with the rest of the network , including a new Nexus 7 running Android through AndSMB, and tweaked for quick data transfers it […]
[…] Networking: Sharing folders between Windows and Linux using Samba Fedora Update: undefined symbol: DRIOpenDRMMaster […]
[…] Windows and Linux: Samba / CIFS Network Sharing […]
[…] follow us on our Samba / CIFS Connectivity page for the resolution to the issue. Hope this helps […]
[…] tips on this Samba / CIFS Connectivity page may […]
[…] Windows and Linux: Samba / CIFS Network Sharing […]
[…] can also enable SMB / Samba file sharing on the individual cluster hosts and allow visibility to the Gluster FS / NFS – Ganesha […]