findsmb fail!

Hi guys,

I’m trying to browser computers running on the workgroup. So I tried “findsmb” command, but it shows me error:

findsmb
Scalar value @t1[3] better written as $t1[3] at /usr/bin/findsmb line 45.
Scalar value @t2[3] better written as $t2[3] at /usr/bin/findsmb line 45.
Scalar value @name[0] better written as $name[0] at /usr/bin/findsmb line 79.
Scalar value @info[0] better written as $info[0] at /usr/bin/findsmb line 114.
Scalar value @name[0] better written as $name[0] at /usr/bin/findsmb line 122.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 27.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 27.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 29.
Use of uninitialized value $BCAST in concatenation (.) or string at /usr/bin/findsmb line 51.


                                *=DMB
                                +=LMB
Use of uninitialized value $BCAST in concatenation (.) or string at /usr/bin/findsmb line 62, <NMBLOOKUP> line 2.
IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION 
---------------------------------------------------------------------

I’m using OpenSUSE 12.2 , KDE 4.9
Thanks for your helps!

Looks like several bugs in that perl script. I am not sure who uses this as I have not heard of it being there before. You can raise a bug report on it here: Bugzilla Main Page

I normally suggest that you install smb4k for looking at workgroups in a desktop. In KDE I just use Dolphin and select Network on the right and then Samba Shares. For info on using Samba with SWAT, have a look at these blogs.

Samba S.W.A.T. - Samba Web Administration Tool Setup for openSUSE: https://forums.opensuse.org/blogs/jdmcdaniel3/samba-swat-samba-web-administration-tool-setup-opensuse-76/

AND

SWAT - Samba Web Administration Tool - Setup & Creation Script - 1.04: https://forums.opensuse.org/blogs/jdmcdaniel3/swat-samba-web-administration-tool-setup-creation-script-1-03-105/

Thank You,

I too have been having trouble with findsmb being reliable. So, I did some digging and tried starting with smbtree. I ended up with the following after some trial and error:

smbtree -SN|grep '\\'|cut -f2|cut -c 3-|while read svr; do echo -ne "$svr	"; ipname=$(nmblookup $svr|grep '<00>'); cmnt=$(smbclient -NL $svr 2>&1|grep -m 1 'IPC'|cut -c 40-); echo -e "$ipname	$cmnt"; done

At least it lists servers and ip addresses, which is what I was interested in.

Best,
Alex

when I tried smbtree, it just list 1 computer from workgroup.

I also installed samba and it worked perfectly!