Creating a samba share in windows 10

Page 1 of 2 12 LastLast

  1. Posts : 57
    Windows 10 home
       #1

    Creating a samba share in windows 10


    I've been using unauthenticated samba share on my computer for well over a decade using windows 7, vista, and XP (and maybe even further back) to network with various devices in another room via an ethernet cable. I believe Microsoft removed unauthenticated samba shares from windows 10 because they thought it was insecure. So since my computer updated automatically to windows 10 those other devices are no longer able to see anything on my network. I have seen that a few other windows 10 users have been able to re-enable such samba shares, although I have tried all the tricks they have used and have never been able to get it to work. Since my other devices have the ability to enter a CFIS username and password, another possibility would be to create an authenticated samba share in windows 10. Since this would be more secure, I wouldn't think Microsoft would remove such a feature, however I haven't been able to figure out how to do this either. Does anyone know if windows 10 includes support for this type of networking (which seems to be required to network with most linux devices) and if so, how do I enable such a share and define the CFIS username and password?

    Thanks
    ~Paul
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #2

    Hi there

    @pmennen

    Not sure what Linux distro you've got - I'm using CENTOS 7

    For SAMBA ensure latest packages are installed - you need the SERVER (and the client as well if you want to see Shares on your Linux system from other Linux systems / Windows systems).

    On Windows and the Linux system create accounts (users) with passwords who can access the shares
    On the Linux system allow SAMBA through any firewall -- for testing I'd switch firewalls off on BOTH Linux and Windows to get the thing working

    once SAMBA is up and running

    on the Linux side -- first create your smb.config file -- will show that later in this post.

    Ensure the files are mounted on the Linux system. I'll share 2 entire HDD's which are /dev/sdb and /dev/sdc and I'll mount to mnt/DV1 and /mnt/DV2. ( Simply create READ / WRITE empty directories in /mnt.

    to mount

    mount /dev/sdb -t auto -o rw /mnt/DV1
    mount /dev/sdc -t auto -o rw /mnt/DV2

    now for the samba bits

    1) as root or sudo ---enter this commands
    smbpasswd -a user password where user = user and password = users password. This only needs to be done once.

    2) after each boot start the samba daemons -- service smb start, service nmb start. Note on some Linux distros the daemons might be smbd and nmbd and you might need systemctl service command rather than just service.

    3) use a smb.conf file similar to this -- has a very simple config and almost now security but easy for testing. Once you've got it all working you can then tighten up security. The file usually resides in /etc/samba


    #======================= Global Settings =====================================

    [global]
    max protocol = SMB3
    # can set it to SMB2 if you want experimental SMB2 support.
    #
    workgroup = WORKGROUP
    server string = Samba Server Version %v

    ; max protocol = SMB2

    log file = /var/log/samba/log.%m
    max log size = 50
    security = user
    passdb backend = tdbsam
    name resolve order = bcast host lmhosts wins

    load printers = yes
    cups options = raw

    ; printcap name = /etc/printcap
    # obtain a list of printers automatically on UNIX System V systems:
    ; printcap name = lpstat
    ; printing = cups


    #============================ Share Definitions ==============================

    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    valid users = %S

    [printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = no
    writable = no
    printable = yes

    [HDD1]
    comment HDD1
    path = /mnt/DV1
    guest ok = yes
    writeable = yes
    browseable = yes

    [HDD2]
    comment HDD2
    path = /mnt/DV2
    guest ok = yes
    writeable = yes
    browseable = yes


    On the Windows system you should see HDD1 and HDD2 under the computer when you map the network

    Mount these as network drives (file explorer --> connect network drive).

    I'd stop windows firewall to while testing -- both inbound and outbound.

    Note after SAMBA start Windows takes a few minutes before it sees the updated network.

    Creating a samba share in windows 10-nw1.png

    Attachment 117217

    I'm using latest version of W10 PRO X-64. Latest updates applied too.

    On your Linux system you should be able to see the SAMBA connections in your file browser easily enough too.

    Creating a samba share in windows 10-snapshot9.png

    Cheers
    jimbo
    Last edited by jimbo45; 15 Jan 2017 at 08:19.
      My Computer


  3. Posts : 57
    Windows 10 home
    Thread Starter
       #3

    Hi Jimbo45. Thanks a lot for your reply, although maybe you misinterpreted my question. I think you were showing me how to share a disk on the Linux system with my windows 10 system (although I didn't understand your answer very will, so perhaps I am mistaken). But what I asked in my email was the other way around. I want to share a disk on my windows system with the other device. I should have said what the other device was (A bluray player) because although I am almost certain it is running linux internally I have no access to that. The only relevant thing I can configure relating to this device is that I can enter a CFIS username and password (which I have never needed before.)

    If I hook up an old laptop I have running windows XP, the bluray player can see the disks on that laptop (no CFIS password required). But I really want it to see the disks on my desktop computer as it used to. Now that windows has updated itself (to windows 10) this no longer works. I was hoping I could simply create a samba share for one of my disks on the desktop computer so that the bluray player can browse (and play) the files and folders on that disk. An unauthenticated share would be the most convenient since then I don't have to enter a CFIS username and password on the bluray player, however I think I have to give up on that since I have been trying that approach for many months with no success. The next best thing would be an authenticated share. Perhaps you were telling me how to do that, although I'm not sure. (There is no samba folder under windows\system32\drivers\etc).

    ~Paul
      My Computer


  4. Posts : 856
    Windows 10 Pro 21H2 build 19045.2193 Dual Boot Linux Mint
       #4

    Should be working out of the box? Just check you have smb1.0/CIFS File sharing support enabled in Control Panel\All Control Panel Items\Programs and Features > Windows Features, should be ticked by default however worth checking.
    If it needs enabling you may need to reboot for it to kick in.

    Might also be worth turning all the networked stuff off and making sure the PC starts first.
      My Computers


  5. Posts : 9,765
    Mac OS Catalina
       #5

    Did you go in and finish installing the rest of Samba? The Linux distros do not always load the complete package of Samba. The default smb.conf will work fine. Just make sure that you create a Samba User and Password.
      My Computer


  6. Posts : 57
    Windows 10 home
    Thread Starter
       #6

    clam1952 said:
    Should be working out of the box? Just check you have smb1.0/CIFS File sharing support enabled in Control Panel\All Control Panel Items\Programs and Features > Windows Features, should be ticked by default however worth checking.
    Thanks for the suggestion clam1952, but it seems that there must be more to it than that, because I see that the checkbox in front of samba/CIFS file sharing is already checked yet that is not enough. With my winXP computer, all that was necessary was to set the disk to shared with permissions to "everyone", and then right away the bluray player (linux device) could see the computer and the shared disk. I do the same thing on my win10 computer but the linux device can't see the win10 computer. I'm guessing windows 10 wants me to set up a CIFS username and password, but if so I have never seen a method of doing this, nor has anybody been able to tell me how it is done.

    (BTW, thanks for the reply bro67 but I don't think you have been reading the whole thread. I'm trying to configure windows 10, not linux.)
      My Computer


  7. Posts : 9,765
    Mac OS Catalina
       #7

    pmennen said:
    Thanks for the suggestion clam1952, but it seems that there must be more to it than that, because I see that the checkbox in front of samba/CIFS file sharing is already checked yet that is not enough. With my winXP computer, all that was necessary was to set the disk to shared with permissions to "everyone", and then right away the bluray player (linux device) could see the computer and the shared disk. I do the same thing on my win10 computer but the linux device can't see the win10 computer. I'm guessing windows 10 wants me to set up a CIFS username and password, but if so I have never seen a method of doing this, nor has anybody been able to tell me how it is done.

    (BTW, thanks for the reply bro67 but I don't think you have been reading the whole thread. I'm trying to configure windows 10, not linux.)
    You have to make sure that the full Samba package is installed in your Linux Distro. The default smb.conf will work. Jimbo spelled it out on the way he has his network setup and it works. CIFS you can toss that out of your head, since it does not work with SAMBA, because CIFS is Microsoft only. They wrote their own version of Samba that is actually running on code from early 3.0 code, but will work if you make sure as I stated, that the full Samba package is installed.

    Be careful on what tools you use if you are using a GUI version of Linux. It will wreck havoc with the smb.conf. You may want to reset the network services on the Windows 10 machine by using Farbar's minitoolbox and Service Scanner. Also third party security software can cause issues, along with the network adapter not set for Private network.

    Jimbo has been doing this a little longer than I have with Linux. That is only because I took a break from computers for about three years while I was in the Navy and was working with AS/400 systems onboard for the stuff that we had to deal with.

    I use a Synology NAS for all sharing and never had an issue with connecting to it with any version of Windows 10. You could just be dealing with a layer of problems, especially if you did a in place upgrade and not a clean install of Windows 10.
      My Computer


  8. Posts : 11,247
    Windows / Linux : Arch Linux
       #8

    Hi there

    @pmennen

    It's absolutely "Easy Peasy" sharing Windows with Linux and accessing Windows files which is what I believe you want to do.

    Note - check though package ntfs-3g is installed on the Linux system - most distros have it installed by default --I'm using CENTOS 7 which need me to install if from the repository. This package adds the READ / WRITE element for NTFS into the linux kernel as module fuse. Ensures you have READ / WRITE ability on NTFS.

    1) ensure the Windows HDD's are SHARED


    2) You still need SAMBA on the Linux system as I mentioned on the previous post - just have an smb.conf file with no shares defined (or a "dummy share"). You will need the Global section and ensure the search order is as I've done it in my smb.conf file. Also add user and password with the smbpasswd command (as root / sudo).

    You need to start services smb and nmb or smbd and nmbd depending on your distro as well.

    3) then on your Linux system you should see something like this when accessing the Windows drives

    (The initial connection will ask for User and password --enter Windows user and password)

    Here I've got Drive "C" as shared -- Linux sees it with no problems. Ensure passwords and users match on both systems -- it's the easiest way to do it.

    Samba is by far the simplest way instead of using import / export / NFS and all the other ways Windows can hose up networking.

    If you leave most of the "Business end" of networking to Linux - even Windows can connect easily enough.

    Allow though your firewall to allow connections (Windows) both in and outbound depending on what you want to do.

    Here's the images from SAMBA on Linux --Drive "C" is the Windows shared HDD on the HP server I've named Blackdog. (That's the Windows computer name on the windows system - both computers in the same workgroup - called workgroup).

    Creating a samba share in windows 10-snapshot12.png

    Creating a samba share in windows 10-snapshot13.png

    Cheers
    jimbo
    Last edited by jimbo45; 16 Jan 2017 at 07:57.
      My Computer


  9. Posts : 856
    Windows 10 Pro 21H2 build 19045.2193 Dual Boot Linux Mint
       #9

    Have a look here? [SOLVED] Windows 10 and SMB

    Had this problem too - it's because Win10 insists on an authenticated SMB login. You can disable it by creating the following value (a DWORD):

    HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\AllowInsecureGuestAuth

    Set the value to 1 , it should work straight away then.
    @bro67 I don't think the OP is using a Linux distro but devices with embedded Linux Operating systems which are not usually editable.
      My Computers


  10. Posts : 11,247
    Windows / Linux : Arch Linux
       #10

    Hi there

    @clam1952

    The OP wants to access Windows shares FROM the Linux boxes - not the other way around which is what the link refers to --accessing his Linux files FROM Windows !!!!.

    If using an Android phone / tablet try installing ES file explorer (on the android device) --- this will scan a LAN and pick up Windows systems --you'll have to log in with User / Password the first time.

    You need to ensure firewalls (on Windows) have permissions to handle in / outbound connections.

    If using a smart TV then your system will be able to handle WINDOWS locally attached devices - but NOT network shared drives on that Windows system networked from other Linux systems.

    If using things like Chrome / Amazon Fire sticks etc PLEX media server will be able to handle any network attached devices to the windows system as well as local drives. Things like VLC though running on the Amazon fire stick / Chromecast device won't be able to see network attached devices on Windows but no problem accessing local drives.

    It really depends on what you want to do with Windows files when accessing from other devices.

    Using a NAS is the easiest and most flexible of course --especially if you install your own Linux system on your NAS --some of those cheap "Cube" type servers are ideal for that purpose --you don't need a huge amount of CPU power for simple file sharing. I find the HP micro server Proliant 8's just fine --you can load up to 4 HDD's on the cube and a separate half size graphics card -- also built in RAID 1 / 0.

    Even a Celeron CPU is normally just fine - transcoding won't kill the CPU and of course these servers are built to run 24 hrs a day 7 days a week consuming little power --far superior to any domestic laptop / desktop for this stuff.

    I'm not in favour of a "dedicated" NAS box with a proprietary OS in it for obvious reasons - however on some of these you can install a few things such as SAMBA and PLEX. If you can handle Linux - using your OWN distro on a small server IMO is the simplest and most productive way of both file and multi-media serving to a whole slew of devices (and Linux Networking usually works first time straight out of the box).

    Like all these things YMMV but without knowing exactly the OP's setup and what he actually wants to do it's harder to give any more help.

    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:23.
Find Us




Windows 10 Forums