Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Problem with Samba between ubuntu server and windows 10 client

  1. #11
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by TheFu View Post
    Actually, I would have changed "tim" to "nobody" and left the other line alone. It is unclear to me what Morbius was saying about it, but if you figured that out. Great.
    I'll adapt it to this.

  2. #12
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Problem with Samba between ubuntu server and windows 10 client

    Originally Posted by TheFu
    Actually, I would have changed "tim" to "nobody" and left the other line alone. It is unclear to me what Morbius was saying about it, but if you figured that out. Great.

    I'll adapt it to this.
    Nope. That will break your setup again.

    An anonymous samba client user tries to connect to the samba shares on your machine.

    ** With "guest account = tim" that user will access your shares as "tim". If the Linux permissions on the folder being accessed allow "tim" access everything is good.

    ** With "guest account = nobody" - which is the default so there is no need to put it in smb.conf - the anonymous user will be "nobody" and he will not be able to access any of your shares because you specifically told samba to reject him:
    Code:
    invalid users = nobody root
    And even if you didn't tell samba to reject him "nobody" may not have Linux permissions to access the shared folder.

  3. #13
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by Morbius1 View Post
    Nope. That will break your setup again.

    An anonymous samba client user tries to connect to the samba shares on your machine.

    ** With "guest account = tim" that user will access your shares as "tim". If the Linux permissions on the folder being accessed allow "tim" access everything is good.

    ** With "guest account = nobody" - which is the default so there is no need to put it in smb.conf - the anonymous user will be "nobody" and he will not be able to access any of your shares because you specifically told samba to reject him:
    Code:
    invalid users = nobody root
    And even if you didn't tell samba to reject him "nobody" may not have Linux permissions to access the shared folder.
    So what you are saying is that my setup was correct?

  4. #14
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Problem with Samba between ubuntu server and windows 10 client

    This whole side issue started because someone didn't understand what this meant:
    map to guest = bad user
    guest account = tim
    That combination is a legitimate option. The guest user on the client accesses your share and is converted to tim and I'm guessing something like /data is owned by tim and any new file added by the guest user will save as owned by tim so everything works. There are other ways to achieve the same result but it is a legitimate option.

    I mean your Win10 client does have access to these shares so your set up works - except for these timeouts and disconnects.

    Look, there are a number of inconsistencies in your smb.conf that I would not have if I set this up. For example:

    ** You disabled netbios but you set your server to be a domain / preferred master browser that Win10 does not need. Maybe you have older Windows in the lan.

    ** You have the "deadtime = 15" in there for some reason. That really needs to go.

    ** You really should remove the " socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536" line since that's all SambaV2 stuff.

    But none of that matters. You are able to connect to and use the shares from your Win10 machine. What I'm trying to figure out is why WIn10 disconnects itself or why Samba closes the connection of the WIn10 client - I'm not sure at this point who is disconnecting itself from who here. It may be a Win10 issue for all I know. It's not happening to me but I probably don't use it the way you are.
    Last edited by Morbius1; May 22nd, 2019 at 11:38 PM.

  5. #15
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by Morbius1 View Post
    This whole side issue started because someone didn't understand what this meant:

    That combination is a legitimate option. The guest user on the client accesses your share and is converted to tim and I'm guessing something like /data is owned by tim and any new file added by the guest user will save as owned by tim so everything works. There are other ways to achieve the same result but it is a legitimate option.

    I mean your Win10 client does have access to these shares so your set up works - except for these timeouts and disconnects.

    Look, there are a number of inconsistencies in your smb.conf that I would not have if I set this up. For example:

    ** You disabled netbios but you set your server to be a domain / preferred master browser that Win10 does not need. Maybe you have older Windows in the lan.

    ** You have the "deadtime = 15" in there for some reason. That really needs to go.

    ** You really should remove the " socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536" line since that's all SambaV2 stuff.

    But none of that matters. You are able to connect to and use the shares from your Win10 machine. What I'm trying to figure out is why WIn10 disconnects itself or why Samba closes the connection of the WIn10 client - I'm not sure at this point who is disconnecting itself from who here. It may be a Win10 issue for all I know. It's not happening to me but I probably don't use it the way you are.
    Current config:
    Code:
    [global]
    workgroup = WORKGROUP
    server string = Samba Server %v
    netbios name = LinuxServer
    #security = user
    #security = share
    map to guest = bad user
    guest account = tim
    dns proxy = no
    create mask = 0777
    directory mask = 0777
    #printing = bsd
    #printcap name = /dev/null
    browseable = yes
    lock directory = /var/lock/samba
    locking = yes
    strict locking = no
    writable = yes
    ntlm auth = true
    
    bind interfaces only = yes
    disable netbios = yes
    invalid users = nobody root
    load printers = no
    max connections = 10
    preferred master = yes
    printable = no
    strict sync = no

    I changed one drive to using ip, does not resolve the issue. When working with a lot of files I can immediately reproduce the issue.
    Just get 50 or something rars and unrar them at the same time.

    Also having the issue with doing other stuff but this has been the fastest way to have the issue.

  6. #16
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Problem with Samba between ubuntu server and windows 10 client

    The next time your Win10 machine connects to this server run this command on the server to see the connection parameters and post the results:
    Code:
    sudo smbstatus

    I'm also wondering about these 50 simultaneous operations you are performing - this is one of those things I have never done. My wonder is if each one is considered a separate connection. You have in your smb.conf a parameter - max connections = 10 - that limits the number of connections. Is one user from one machine a connection? Or is it one user doing one thing from one machine a connection? I'm not sure. The default value for that parameter is 0 which = unlimited.

    Question: You have / had some options in your smb.conf that implies that you have many clients to this machine. Is it just this server and a Win10 machine or do you have many clients and it's only the Win10 machine that is the issue?

  7. #17
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by Morbius1 View Post
    The next time your Win10 machine connects to this server run this command on the server to see the connection parameters and post the results:
    Code:
    sudo smbstatus

    I'm also wondering about these 50 simultaneous operations you are performing - this is one of those things I have never done. My wonder is if each one is considered a separate connection. You have in your smb.conf a parameter - max connections = 10 - that limits the number of connections. Is one user from one machine a connection? Or is it one user doing one thing from one machine a connection? I'm not sure. The default value for that parameter is 0 which = unlimited.

    Question: You have / had some options in your smb.conf that implies that you have many clients to this machine. Is it just this server and a Win10 machine or do you have many clients and it's only the Win10 machine that is the issue?

    I have only one windows 10 machine connection to the share but sometimes a laptop also on windows 10 connects. Same sort of behavior.
    max connections = 10 has been removed from my settings, does not change anything.

  8. #18
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Problem with Samba between ubuntu server and windows 10 client

    If you have the time I would like to see the entire output of the smbstatus command.

  9. #19
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by Morbius1 View Post
    If you have the time I would like to see the entire output of the smbstatus command.
    Yep I will do this during the weekend and will come back to you.

  10. #20
    Join Date
    May 2019
    Beans
    13

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by unrealbe View Post
    Yep I will do this during the weekend and will come back to you.
    Code:
    ~$ sudo smbstatus
    
    Samba version 4.7.6-Ubuntu
    PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing
    ----------------------------------------------------------------------------------------------------------------------------------------
    2091    tim          tim          192.168.1.55 (ipv4:192.168.1.55:53120)    SMB3_11           -                    partial(AES-128-CMAC)
    
    Service      pid     Machine       Connected at                     Encryption   Signing
    ---------------------------------------------------------------------------------------------
    Disc2        2091    192.168.1.55  Sat May 25 01:07:10 PM 2019 CEST -            -
    Disc4        2091    192.168.1.55  Sat May 25 01:07:09 PM 2019 CEST -            -
    Disc3        2091    192.168.1.55  Sat May 25 01:07:10 PM 2019 CEST -            -
    Disc5        2091    192.168.1.55  Sat May 25 01:04:41 PM 2019 CEST -            -
    Disc6        2091    192.168.1.55  Sat May 25 01:07:08 PM 2019 CEST -            -
    Disc1        2091    192.168.1.55  Sat May 25 01:07:11 PM 2019 CEST -            -
    Dataserver   2091    192.168.1.55  Sat May 25 01:07:08 PM 2019 CEST -            -
    
    Locked files:
    Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
    --------------------------------------------------------------------------------------------------
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100080    RDONLY     NONE             /media/disc4   .   Sat May 25 13:07:09 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /data   .   Sat May 25 13:08:49 2019
    2091         1000       DENY_NONE  0x100080    RDONLY     NONE             /media/disc6   .   Sat May 25 13:07:07 2019
    2091         1000       DENY_NONE  0x100080    RDONLY     NONE             /media/disc3   .   Sat May 25 13:07:09 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren/d/Devil Childe   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren/d/Devil Childe   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100080    RDONLY     NONE             /media/disc1   .   Sat May 25 13:07:10 2019
    2091         1000       DENY_NONE  0x100080    RDONLY     NONE             /media/disc2   .   Sat May 25 13:07:10 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/MusicBee   Sat May 25 13:58:17 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/MusicBee   Sat May 25 13:58:17 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren/strappado   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek/Tim/te classificeren/strappado   Sat May 25 13:07:03 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek   Sat May 25 13:58:16 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   Muziek   Sat May 25 13:58:16 2019
    2091         1000       DENY_NONE  0x100081    RDONLY     NONE             /media/disc5   .   Sat May 25 13:06:59 2019
    Seems strange since I did not browse to all those subfolders manually in Muziek.

    Edit I forced the problem to happen and this is the current situation (before I restart the service):
    ~$ sudo smbstatus

    Code:
    Samba version 4.7.6-Ubuntu
    PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    Service      pid     Machine       Connected at                     Encryption   Signing
    ---------------------------------------------------------------------------------------------
    
    Locked files:
    Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
    --------------------------------------------------------------------------------------------------
    Last edited by unrealbe; May 25th, 2019 at 01:23 PM.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •