Samba running but workgroup not visible on LAN (timeout on ...)

Not sure why, but now my samba shares are not visible over my LAN, but they are running at boot.

The firewall is configured, runlevels have been set…

I can’t pinpoint when this started, but sometime early this week.

The output from

service nmb status && service smb status

is:

redirecting to systemctl                                                                                                                
nmb.service - LSB: Samba NetBIOS naming service over IP                                                                                 
          Loaded: loaded (/etc/init.d/nmb)                                                                                              
          Active: active (running) since Tue, 21 Feb 2012 08:01:19 -0700; 1h 20min ago                                                  
         Process: 1666 ExecReload=/etc/init.d/nmb reload (code=exited, status=3/NOTIMPLEMENTED)                                         
         Process: 1648 ExecStart=/etc/init.d/nmb start (code=exited, status=0/SUCCESS)                                                  
          CGroup: name=systemd:/system/nmb.service                                                                                      
                  └ 1657 /usr/sbin/nmbd -D -s /etc/samba/smb.conf

smb.service - LSB: Samba SMB/CIFS file and print server
          Loaded: loaded (/etc/init.d/smb)
          Active: active (running) since Tue, 21 Feb 2012 08:01:14 -0700; 1h 20min ago
         Process: 1676 ExecReload=/etc/init.d/smb reload (code=exited, status=0/SUCCESS)
         Process: 1481 ExecStart=/etc/init.d/smb start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/smb.service
                  ├ 1507 /usr/sbin/smbd -D -s /etc/samba/smb.conf
                  └ 1514 /usr/sbin/smbd -D -s /etc/samba/smb.conf

If I navigate to smb://192.168.0.1 it says “Timeout on server 192.168.0.1” and doesn’t load anything.

Here is my smb.conf file contents:

# 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: 2012-02-02
[global]
    workgroup = CAMERONECT
    netbios name = alien
    name resolve order = bcast host lmhosts wins
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    use client driver = yes
    server string = ""
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    usershare allow guests = Yes
    usershare max shares = 100
    usershare owner only = False
    local master = yes
    os level = 33
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes


## Share disabled by YaST
# [profiles]
#    comment = Network Profiles Service
#    path = %H
#    read only = No
#    store dos attributes = Yes
#    create mask = 0600
#    directory mask = 0700


## Share disabled by YaST
# [users]
#    comment = All users
#    path = /home
#    read only = No
#    inherit acls = Yes
#    veto files = /aquota.user/groups/shares/


## Share disabled by YaST
# [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
[smb]
    comment = smb public folder for alien
    path = /home/saultdon/smb
    guest ok = yes

It’s not until I run

rcnmb restart && rcsmb restart

that I can navigate the shares and they show up.

System info:
openSUSE 12.1 x64, KDE 4.8.00, Linux 3.1.9-1.4
Samba 3.6.3-89.1-2761

On Tue February 21 2012 11:06 pm, saultdon wrote:

>
> Not sure why, but now my samba shares are not visible over my LAN, but
> they are running at boot.
>
> The firewall is configured, runlevels have been set…
>
> I can’t pinpoint when this started, but sometime early this week.
>
> The output from
> Code:
> --------------------
> service nmb status && service smb status
> --------------------
> is:
>
> Code:
> --------------------
> redirecting to systemctl
> nmb.service - LSB: Samba NetBIOS naming service over IP
> Loaded: loaded (/etc/init.d/nmb)
> Active: active (running) since Tue, 21 Feb 2012 08:01:19 -0700; 1h 20min
ago
> Process: 1666 ExecReload=/etc/init.d/nmb reload (code=exited,
status=3/NOTIMPLEMENTED)
> Process: 1648 ExecStart=/etc/init.d/nmb start (code=exited,
status=0/SUCCESS)
> CGroup: name=systemd:/system/nmb.service
> └ 1657 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
>
> --------------------
>
>
> Code:
> --------------------
> smb.service - LSB: Samba SMB/CIFS file and print server
> Loaded: loaded (/etc/init.d/smb)
> Active: active (running) since Tue, 21 Feb 2012 08:01:14 -0700; 1h 20min
ago
> Process: 1676 ExecReload=/etc/init.d/smb reload (code=exited,
status=0/SUCCESS)
> Process: 1481 ExecStart=/etc/init.d/smb start (code=exited,
status=0/SUCCESS)
> CGroup: name=systemd:/system/smb.service
> ├ 1507 /usr/sbin/smbd -D -s /etc/samba/smb.conf
> └ 1514 /usr/sbin/smbd -D -s /etc/samba/smb.conf
>
> --------------------
>
>
> If I navigate to smb://192.168.0.1 it says “Timeout on server
> 192.168.0.1” and doesn’t load anything.
>
> Here is my smb.conf file contents:
<snip>
>
>
> It’s not until I run
> Code:
> --------------------
> rcnmb restart && rcsmb restart
> --------------------
> that I can navigate the shares and they show up.
>
> System info:
> openSUSE 12.1 x64, KDE 4.8.00, Linux 3.1.9-1.4
> Samba 3.6.3-89.1-2761
>
saultdon;

Do you get the same results booting with systemV? (F5 at boot).


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Venzkep is probably on the right track. For more on that see the sticky at the top of the networking forum:
Problem with Samba in openSUSE 12.1 re systemd

I installed [LEFT]sysvinit-init but still can’t see my samba shares. Get the timeout error until I restart the nmb/smb daemons.

Thanks for the sticky.[/LEFT]

If apparmor is installed and started, perhaps this module block access to some folders & files

To check systemctl status apparmor.service
and have a look at /var/log/audit/audit.log

You can adjust the configuration of it in Yast security apparmor

Is apparmor installed and running by default? I will check this evening when I get to my home PC.

I will check those logs as suggested and report outcome here.

Akonadi and Nepomuk were disabled when I first installed opensuse so those aren’t running either.

On Wed February 22 2012 11:06 am, saultdon wrote:

>
> Is apparmor installed and running by default? I will check this evening
> when I get to my home PC.
>
> I will check those logs as suggested and report outcome here.
>
> Akonadi and Nepomuk were disabled when I first installed opensuse so
> those aren’t running either.
>
saultdon;

When you check the logs also look at
/var/log/samba/log.nmbd, /var/log/samba/log.smbd and /var/log/messages. You
can increase the details in the samba logs by adding the parameter “log level
= 3” to the global section of /etc/samba/smb.conf. (The level can be raised
as high as 10 but that is likely way more detail than you want without the
Samba code at hand.)

Upon occasion a Windows machine will grab the role of master browser away from
the Samba machine and destroy network browsing. This happens in spite of
settings in your smb.conf. When you can not browse the network, look
at /var/lib/samba/browse.dat. This is a text file and should contain a list
of all the machines in your workgroup. Should this file only contain the name
of your OpenSuse machine, browsing has been hijacked. If you do have a rogue
Windows machine in your workgroup, there is a reg edit that can be done to the
offending machine to prevent this behavior. (or drop it off the roof) I might
also note that restarting nmbd almost always solves the problem until the
rogue machine is removed and then reconnected to your network.

The above does not explain the failure of Samba client to see shares via IP.
Are you certain that 192.168.0.1 is the actual address of a workgroup machine
and not just your router?


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

I will check these out, looks like they will definitely have some useful information. Thanks!

I should of mentioned - there are only openSUSE PCs accessing the samba share [smb].I have a similar setup on a laptop and it displays the same behaviour.
It was working before, everything loaded fine on boot.
There may of been a specific update that caused this?
The primary purpose of samba for me is to share zyppers cached packages to multiple PCs on the LAN to reduce bandwidth and dload/install times.
My windows discs have been collecting dust.

You’re right, it is the router, but I just provided as an example ip :wink:

less /var/log/messages | grep samba

cat /var/log/samba/log.nmbd

cat /var/log/samba/log.smbd

There are a few warnings and errors. Not sure what to do from here, but thanks for all the help so far everyone.

I tried @venzkep’s original suggestion after having installed sysinit-init and restarted the rcnmb and rcsmb services while booting into console mode (recovery with networking) and now everything seems to be working fine.

ERROR BACK!

OK, so I looked more into my nmbd/smbd (NEW) log files and found a line that says something about my wired internet connection not ready (eth0) when it tries to initialize the daemons.

This part is from nmbd:

[2012/02/23 18:38:27,  0] nmbd/nmbd_subnetdb.c:251(create_subnets)  create_subnets: Waiting for an interface to appear ...

The log links I’ve provided show a boot around 18:06 that failed to load the samba shares, causing a timeout.

The later logs for around 18:38+ are when I booted and it magically appeared.

Regardless, it often does not load the samba shares on boot and I still have to re-initialize manually with: rcnmb restart && rcsmb restart

Is this because of my eth0 connection not being active immediately when samba tries to come online?

On Thu February 23 2012 07:56 pm, saultdon wrote:

>
> ERROR BACK!
>
> OK, so I looked more into my ‘nmbd’
> (http://pastebin.com/yBpB2R4t)/‘smbd’ (http://pastebin.com/WfNPxh4f)
> (NEW) log files and found a line that says something about my wired
> internet connection not ready (eth0) when it tries to initialize the
> daemons.
>
> This part is from nmbd:
>
> Code:
> --------------------
> [2012/02/23 18:38:27, 0] nmbd/nmbd_subnetdb.c:251(create_subnets)
create_subnets: Waiting for an interface to appear …
> --------------------
>
>
> The log links I’ve provided show a boot around 18:06 that failed to
> load the samba shares, causing a timeout.
>
> The later logs for around 18:38+ are when I booted and it magically
> appeared.
>
> Regardless, it often does not load the samba shares on boot and I still
> have to re-initialize manually with: rcnmb restart && rcsmb restart
>
> Is this because of my eth0 connection not being active immediately when
> samba tries to come online?
>
>
saultdon;

I see you have upgraded Samba from 3.6.1 to 3.6.3. Could you have missed a
library? Go into YaST and make sure every thing was upgraded. Just as a
note, I’m running 3.6.3 on 11.4 without issue.

Have you tried booting with the SuSEfirewall2 turned off. It’s possible that
the ports are not opened when [s,n]mbd initialize. (I doubt this is the
case, but it is worth checking.)

You mentioned that you have multiple OpenSUSE machines with similar setups.

Do all the smb.conf(s) contain the parameter “os level = 33”, if so remove that
parameter on all but one of the machines. Those without that parameter will
use the default value of 20. You may have a couple of machines competing for
the role of master browser.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

All the required packages are there and installed, so that looks good : [LEFT]samba, samba-doc, yast2-samba-client, samba-client, yast2-samba-server[/LEFT]

I would of loved for it to of been something as simple as this! Samba still doesn’t start up.

So I removed it from all machines, kept the other samba PC (my laptop) turned off, but still no-go.
[LEFT]From what I can remember when reading swerdnas article (Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x) the number 33 is to enable the Local Master Browser, and not the Local Master so they shouldn’t be conflicting with each other right?

This was in my smb log:


[2012/02/24 18:11:59.059576,  3] ../lib/util/params.c:550(pm_process)
  params.c:pm_process() - **Processing configuration file "/etc/samba/smb.conf"**
[2012/02/24 18:11:59.059611,  3] param/loadparm.c:8310(do_section)
  Processing section "[global]"
[2012/02/24 18:11:59.059697,  3] ../lib/util/params.c:550(pm_process)
  params.c:pm_process() - **Processing configuration file "/etc/samba/dhcp.conf"**
[2012/02/24 18:11:59.059783,  2] param/loadparm.c:8327(do_section)
  Processing section "[homes]"
[2012/02/24 18:11:59.059870,  2] param/loadparm.c:8327(do_section)
  Processing section "[printers]"
[2012/02/24 18:11:59.059949,  2] param/loadparm.c:8327(do_section)
  Processing section "[print$]"
[2012/02/24 18:11:59.060017,  2] param/loadparm.c:8327(do_section)
  Processing section "[smb]"
[2012/02/24 18:11:59.060104,  3] param/loadparm.c:6630(lp_add_ipc)
  adding IPC service
[2012/02/24 18:11:59.060303,  3] smbd/server.c:1085(main)
  loaded services
[2012/02/24 18:11:59.134464,  3] smbd/server.c:1117(main)
**  Becoming a daemon.**
[2012/02/24 18:12:00.846505,  3] passdb/lookup_sid.c:1737(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for root
[2012/02/24 18:12:00.866928,  3] auth/token_util.c:438(finalize_local_nt_token)
  Failed to fetch domain sid for CAMERONECT
[2012/02/24 18:12:00.867013,  3] auth/token_util.c:469(finalize_local_nt_token)
  Failed to fetch domain sid for CAMERONECT
[2012/02/24 18:12:00.982894,  3] passdb/lookup_sid.c:1737(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for nobody
[2012/02/24 18:12:00.982993,  3] auth/token_util.c:438(finalize_local_nt_token)
  Failed to fetch domain sid for CAMERONECT
[2012/02/24 18:12:00.983061,  3] auth/token_util.c:469(finalize_local_nt_token)
**  Failed to fetch domain sid for CAMERONECT**
[2012/02/24 18:12:00.983462,  3] rpc_server/svcctl/srv_svcctl_reg.c:569(svcctl_init_winreg)
  Initialise the svcctl registry keys if needed.
[2012/02/24 18:12:00.984162,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.984316,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.984518,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.984667,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.984862,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985014,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985216,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985374,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985423,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985491,  3] rpc_server/eventlog/srv_eventlog_reg.c:59(eventlog_init_winreg)
  Initialise the eventlog registry keys if needed.
[2012/02/24 18:12:00.985675,  3] rpc_server/rpc_handles.c:281(close_policy_hnd)
  Closed policy
[2012/02/24 18:12:00.985738,  3] printing/pcap.c:138(pcap_cache_reload)
  reloading printcap cache
[2012/02/24 18:12:00.986145,  3] printing/pcap.c:189(pcap_cache_reload)
  reload status: ok
[2012/02/24 18:12:00.986215,  3] printing/printing.c:1644(start_background_queue)
  start_background_queue: Starting background LPQ thread
[2012/02/24 18:12:00.986801,  3] ../lib/util/util_net.c:70(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name 0.0.0.0 [Address family for hostname not supported]
[2012/02/24 18:12:00.986992,  3] ../lib/util/util_net.c:70(interpret_string_addr_internal)
**  interpret_string_addr_internal: getaddrinfo failed for name 0.0.0.0 [Address family for hostname not supported]**
[2012/02/24 18:12:00.987135,  2] smbd/server.c:839(smbd_parent_loop)
  waiting for connections
[2012/02/24 18:12:00.989856,  1] lib/serverid.c:197(serverid_deregister)
**  Deleting serverid.tdb record failed: NT_STATUS_NOT_FOUND**
[2012/02/24 18:12:00.989915,  1] smbd/server.c:309(remove_child_pid)
**  Could not remove pid 1772 from serverid.tdb**
[2012/02/24 18:12:00.989949,  1] smbd/server.c:323(remove_child_pid)
**  Could not find child 1772 -- ignoring**

[/LEFT]

I highlighted parts in red that tell me something is wrong, and the parts in blue that would say it is working… Does anything stand out?

This is my output from nmbstatus && smbstatus:


linux-z2zb:~ # **smbstatus**
*lp_load_ex: refreshing parameters*
*Initialising global parameters*
*rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)*
*params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"*
*Processing section "[global]"*
*params.c:pm_process() - Processing configuration file "/etc/samba/dhcp.conf"*
*Processing section "[homes]"*
*Processing section "[printers]"*
*Processing section "[print$]"*
*Processing section "[smb]"*

*Samba version 3.6.3-89.1-2761-SUSE-SL12.1-x86_64*
*PID     Username      Group         Machine                        *
*-------------------------------------------------------------------*

*Service      pid     machine       Connected at*
*-------------------------------------------------------*

*No locked files*


linux-z2zb:~ # **nmbstatus**
*Found 1 hosts. Collecting additional information. Please wait.*
*.*

So that means they are running.

I think I have a package in there that is screwing this up, or lack thereof.
Maybe a fresh install is in order to slowly watch what gets installed so I can more easily flag where this goes wrong. Luckily, I cache all my downloaded packages so I don’t have to re-download in the future and can have this system up and running in less than 40 mins.

But I want to learn more about how to troubleshoot this and actually fix it rather than try to avoid it.

On Fri February 24 2012 07:56 pm, saultdon wrote:

<snip>
> venzkep;2443025 Wrote:
>>
>> Do all the smb.conf(s) contain the parameter “os level = 33”, if so
>> remove that
>> parameter on all but one of the machines. Those without that parameter
>> will
>> use the default value of 20. You may have a couple of machines
>> competing for
>> the role of master browser.
>>
> So I removed it from all machines, kept the other samba PC (my laptop)
> turned off, but still no-go.
>
> From what I can remember when reading swerdnas article (‘Samba
> and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network.
> Versions 11.x’ (http://opensuse.swerdna.org/suselanprimer.html#lmb)) the
> number 33 is to enable the Local Master Browser, and not the
> Local Master so they shouldn’t be conflicting with each other right?
>
<snip>
>
saultdon;

Setting the “os level” can be used to give the Samba machine an “edge” in the
election for Local Master Browser. Setting “local master = yes”, the default
value, allows Samba to participate in the election. See: man smb.conf
(http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html)


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Well, I re-installed openSUSE 12.1 (KDE 4.7.x) and did a normal upgrade with “zypper up --auto-agree-with-licenses” and all installed fine.

I then configured samba and for the first few restarts, it was good! Then magically, it started again. So what I’ve done now is create a simple startup script that runs during login to restart the firewall and the NMB/SMB daemons.

/usr/rcsusefirewall2 restart
/usr/sbin/rcnmb restart && /usr/sbin/rcsmb restart

[SOLVED]With that simple startup script, I can see samba shares immediately.

I tried booting next with systemV (without the startup script) and that didn’t do anything, and I turned off the splash to make sure nmb/smb was being loaded, and they are OK.

EDIT: Just to add, I even tried rebooting with either ifup or networkmanager, but that didn’t seem to make any difference either.