Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: samba can not reconnect

  1. #1
    Join Date
    May 2011
    Location
    here
    Posts
    180

    Default samba can not reconnect

    Hi all, having these issue with samba,
    after random time (it can be after 20 min or after 5-8min) my client mashine on windows 7 disconnects from opensuse 11.4 kde server. When i refresh disk on windows I am getting message that local device is already in use and that connection has not been restored.

    I need to go to my suse and type service smb restart but these command usualy dont work I need to retype it for few times until windows can reconnect.

    it happen quite offen, hapend while wathing movie from shared disc...

  2. #2

    Default Re: samba can not reconnect

    Quote Originally Posted by loand View Post
    I need to go to my suse and type service smb restart but these command usualy dont work I need to retype it for few times until windows can reconnect.
    Are you sure you have to restart the service several times? And are you sure you have to restart the service at all? What happens if you just wait? And before restarting the service, can you type:

    Code:
    service smb status
    to check if it's actually still running.

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: samba can not reconnect

    The command "service smb status" does require that you have root authority and I might add a couple more commands to that with the terminal command sequence:

    Code:
    # su -
    password:
    # service smb status
    Checking for Samba SMB daemon running
    # service nmb status
    Checking for Samba NMB daemon running
    # cat /etc/samba/smb.conf
    You will type in the commands shown in bold (password you type not shown) and then copy and past the results of the three last commands here in a message for us to see. Use the advance message editor, highlight the text you paste into the message from your terminal session and put it into a code (#) field as I did above.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4
    Join Date
    May 2011
    Location
    here
    Posts
    180

    Default Re: samba can not reconnect

    Code:
    linux-c6ea:/home/andre # service smb status
    Checking for Samba SMB daemon                                          running
    linux-c6ea:/home/andre # service nmb status
    Checking for Samba NMB daemon                                          running
    linux-c6ea:/home/andre # cat /etc/samba/smb.conf
    # smb.conf is the main Samba configuration file. You find a full commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    # Date: 2011-03-01
    [global]
    printcap name = cups
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain logons = Yes
    domain master = Yes
    netbios name = andre
    os level = 65
    preferred master = Yes
    
    [homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
    
    [profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
    
    [groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
    
    [printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
    
    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775
    
    [netlogon]
    comment = Network Logon Service
    path = /var/lib/samba/netlogon
    write list = root
    
    [SAMBA]
    path = /home/andre/Samba/
    guest ok = yes
    inherit permissions = yes
    delete readonly = yes
    read only = no
    admin users = GNOJEK
    thanks for responses....

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: samba can not reconnect

    So, if this is just a standard peer to peer Windows share setup between two machinces, I wonder why you have the following items included?

    Code:
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    In the following group I have the domain questions set to no and do not include the os level (which forces the Browse master between two PC's).

    Code:
    os level = 65
    domain logons = Yes
    domain master = Yes
    And I did not see a workgroup name there:

    Code:
    workgroup = something
    There is a great tutorial on setting up Samba you can read here:

    Samba: Practical Introduction to Linux Usershares on openSUSE 10 11

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  6. #6

    Default Re: samba can not reconnect

    Also look for logs in /var/log/samba and if you find a file with the name or ip of your Windows client (maybe prefixed with "log."), look in this file for useful information. I'm not sure about the path though. That's what I'm using but I don't remember if it's the default or if I added it myself (as for many things actually).
    This is the option I use in the global section (meaning, if it's the default - which a samba guru that I'm not could confirm - you don't need to specify it):
    Code:
    log file = /var/log/samba/log.%m
    Now, next time you lose your connection:
    • check on the server if the smb and nmb daemons are running
    • look in /var/log/samba/log.<client name or ip>
    • ping server and client in both directions (however I don't know if Windows responds to pings).
      - on the server:
      Code:
      ping <client name or ip>
      - on the client:
      Code:
      ping <server name or ip>
      * without the brackets!

  7. #7
    Join Date
    May 2011
    Location
    here
    Posts
    180

    Default Re: samba can not reconnect

    thanks for your responses,

    @jdmcdaniel3
    these is configured for 3 laptops and android so I allow all devices to communicate
    and as only linux in network its set to network master with os level = 65
    found in here:
    Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

    thanks for pointing to missing workgroup, I found somewhere on forums that no workgroup can be an issue with firewall and as a matter of fact I have lost firewall config for samba, somehow.
    just accepted the broadcast reply for External Zone and it works.

    thanks for your posts

  8. #8
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: samba can not reconnect

    thanks for pointing to missing workgroup, I found somewhere on forums that no workgroup can be an issue with firewall and as a matter of fact I have lost firewall config for samba, somehow.
    just accepted the broadcast reply for External Zone and it works.

    thanks for your posts
    So you added Samba to your Firewall allowed services, which is very important, and added in a Workgroup name and all is working properly now?

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  9. #9
    Join Date
    May 2011
    Location
    here
    Posts
    180

    Default Re: samba can not reconnect

    yes but firewall was set properly before and dont know why it stoped.....
    any way it works so all good!

    good luck!

  10. #10
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: samba can not reconnect

    yes but firewall was set properly before and dont know why it stoped.....
    any way it works so all good!

    good luck!
    I just love to hear about good news and it was a good thing you looked at your firewall settings. I was happy to have been of help.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

Page 1 of 2 12 LastLast

Posting Permissions

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