Header Shadow Image


Networking: Sharing folders between Windows and Linux using Samba

Pages: 1 2 3

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
.
.
.
[LinuxHomeVideos]
        comment = Sony HDR-SR7 Camcorder Home Movies and Images.
        path = /mnt/LinuxHomeVideos
        valid users = root
        public = no
        writable = yes
        browseable = yes
        guest ok = no
        printable = no

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>
New SMB password:
Retype new SMB password:
Added user <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
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
WARNING: [printers] service MUST be printable!
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
.
.
.
#

There is a WARNING above.  See below Q&A for a resolution.  A successful message will resemble this:
 

# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[HomeVideos]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
.
.
.
#

 

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
Enter root's password:
Domain=[LHS] OS=[Unix] Server=[Samba 3.3.2-0.33.fc11]

        Sharename       Type      Comment
        ———       —-      ——-
        HomeVideos      Disk      Sony HRD-SR7 Camcorder Home Movies and Images.
.
.
.
#

 

7 On Windows PC map the Linux shared folder.

 On the Windows PC, follow these steps:

  • Right click on Start and choose Explore or Explore all Users.  Windows Explorer window should appear.
  • Click on Tools -> Map Network Drive.  A dialog box will appear:
  • As in above image, select the Drive: letter you want to associate with the share.
  • Select the Folder: (ie In this case \\192.168.1.16\homevideos ) to mapp to the above Drive: letter.
  • Check Reconnect at logon if you want the remote path to be connected to when you start your PC.
  • Click Connect using a different user name .  Fill in the username and password you used in step 4:
    Map Network Drive - Connect As
  • Windows will retain above login username and password for the network share.
  • Click Finish.

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…

Pages: 1 2 3

Subscribe
Notify of
11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] Tom Kacperski wrote an interesting post today onNetworking: Sharing folders between Windows and Linux using SambaHere’s a quick excerpt […]

trackback

[…] Networking: Sharing folders between Windows and Linux using Samba […]

trackback

[…] Networking: Sharing folders between Windows and Linux using Samba […]

trackback

[…] NT_STATUS_UNSUCCESSFUL Setting up rules in the firewall between server/client for ports 445,139 etc might do it for your […]

trackback
13 years ago

[…] 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 […]

trackback
13 years ago

[…] Networking: Sharing folders between Windows and Linux using Samba Fedora Update: undefined symbol: DRIOpenDRMMaster […]

trackback

[…] Windows and Linux: Samba / CIFS Network Sharing […]

trackback

[…] follow us on our Samba / CIFS Connectivity page for the resolution to the issue.  Hope this helps […]

trackback

[…] tips on this Samba / CIFS Connectivity page may […]

trackback

[…] Windows and Linux: Samba / CIFS Network Sharing […]

trackback

[…] can also enable SMB / Samba file sharing on the individual cluster hosts and allow visibility to the Gluster FS / NFS – Ganesha […]


     
  Copyright © 2003 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License

 

11
0
Would love your thoughts, please comment.x
()
x
The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.