pyNeighborhood does not see Windows shares

Bug #384398 reported by foxy123
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyneighborhood
Fix Released
Low
Unassigned

Bug Description

pyNeighborhood 0.50 displays Linux shares but not Windows. However the shares can be seen with smbtree:
$ smbtree -N
WORKGROUP
 \\NECLAPTOP Samba 3.3.2
  \\NECLAPTOP\Win-Stylus-DX3800 Epson Stylus DX3800
  \\NECLAPTOP\IPC$ IPC Service (Samba 3.3.2)
  \\NECLAPTOP\alex
  \\NECLAPTOP\print$
 \\AC-PC
  \\AC-PC\Users
  \\AC-PC\print$ Printer Drivers
  \\AC-PC\L$ Default share
  \\AC-PC\IPC$ Remote IPC
  \\AC-PC\H$ Default share
  \\AC-PC\epsonxp epsonxp
  \\AC-PC\diskl
  \\AC-PC\diskh
  \\AC-PC\diskd
  \\AC-PC\D$ Default share
  \\AC-PC\C$ Default share
  \\AC-PC\ADMIN$ Remote Admin

Revision history for this message
Betz Stefan (encbladexp) wrote :

Can you Pipe the smbtree output in file? ("smbtree -N > file.txt")

I think this is a Issue with the 0.5.0er smbtree Parser. Can you run pyNeighborhood in Debug Moden ("pyNeighborhood --debug")?

Greetings
Betz Stefan

Changed in pyneighborhood:
assignee: nobody → Betz Stefan (encbladexp)
importance: Undecided → Low
milestone: none → 0.5.1
status: New → Incomplete
Revision history for this message
foxy123 (foxy) wrote :

Here you are:

~$ pyNeighborhood --debug
Debug: Reloading Browsing View...
Debug: ...OK
Debug: Scanning for hosts via smbtree...
Debug: Running Command '['/usr/bin/smbtree', '-S', '-N']'
Debug: IP Lookup for: NECLAPTOP
Debug: Running Command '['/usr/bin/nmblookup', '-T', 'NECLAPTOP']'
Debug: IP Lookup Result: ('neclaptop.local', '192.168.11.15', 'NECLAPTOP')
Debug: Workgroup Lookup for 192.168.11.15
Debug: Running Command '['/usr/bin/nmblookup', '-A', '192.168.11.15']'
Debug: Workgroup found: WORKGROUP
Debug: NECLAPTOP
Debug: Append Workgroup: WORKGROUP
Debug: Append Host: NECLAPTOP
Debug: IP Lookup for: AC-PC
 Debug: Scanning for Shares:192.168.11.15
Debug: Running Command '['/usr/bin/nmblookup', '-T', 'AC-PC']'
Debug: IP Lookup failed for: AC-PC
Debug: AC-PC
Debug: Throwing away <pyneighborhood.host.host object at 0xa93c0ac>, because no Workgroup detected!
Debug: Running Command '['/usr/bin/smbclient', '-N', '-L', '192.168.11.15']'
Debug: Shares found: {'alex': '', 'print$': ''}
Debug: Appending Share: alex
Debug: Appending Share: print$

Revision history for this message
foxy123 (foxy) wrote :

Looking at the output above, it is nmblookup, which fails for the Windows share. I have tried to run it in the terminal and it properly returns Linux share IP address:

~$ nmblookup -T NECLAPTOP
querying NECLAPTOP on 192.168.11.255
neclaptop.local, 192.168.11.15 NECLAPTOP<00>

but nothing for the Windows share:

~$ nmblookup -T AC-PC
querying AC-PC on 192.168.11.255
~$

If I run it without '-T', then it sort of works:

:~$ nmblookup NECLAPTOP
querying NECLAPTOP on 192.168.11.255
192.168.11.15 NECLAPTOP<00>

~$ nmblookup AC-PC
querying AC-PC on 192.168.11.255
192.168.11.2 AC-PC<00>

but obviously it may be not what is required for the pyNeighborhood to work properly...

Revision history for this message
Betz Stefan (encbladexp) wrote :

pyNeighborhood 0.5.1 (SVN Trunk) has a complete new Browsing Backend.

Can you try this (svn co http://svn.stefan-betz.net/pyneighborhood/trunk pyneighborhood)? The only thing where we have Problems in 0.5.1-preview is that the "Add-Button" dont works :-(

Greetings
Betz Stefan

Revision history for this message
foxy123 (foxy) wrote :

~$ pyNeighborhood --debug
Debug: Starting Browsing Engine...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/pyneighborhood/browsing.py", line 51, in run
    workgroup, workgroupid = query_master_browser(master)
  File "/usr/local/lib/python2.6/dist-packages/pyneighborhood/nmblookup.py", line 74, in query_master_browser
    name, workgroup = lookup(ip)
  File "/usr/local/lib/python2.6/dist-packages/pyneighborhood/nmblookup.py", line 51, in lookup
    return (name, workgroup)
UnboundLocalError: local variable 'name' referenced before assignment

Revision history for this message
Betz Stefan (encbladexp) wrote :

Looks like the new Browsing Backend has a Bug...

Can you pipe the nmblook -A 192.168.1.1 Output in a File and attach these to your next comment? 192.168.1.1 should be the IP Address of the Server!

I think we need some additional Debuging here.

-Betz Stefan

Revision history for this message
foxy123 (foxy) wrote :

Here you are...

Revision history for this message
Betz Stefan (encbladexp) wrote :

Ok, the nmblookup Output is valid for pyNeighborhood.

Now i need the Output of "nmblookup -M -- -" (piped to a File).

-Betz Stefan

Revision history for this message
foxy123 (foxy) wrote :

here you are...

Revision history for this message
Betz Stefan (encbladexp) wrote :

Okay, this Output is also valid :-(

I have added more Debuging Output to pyNeighborhood SVN. Can you make a svn up an test it again with --debug?

-Betz stefan

Revision history for this message
Patrick Geltinger (patlkli) wrote :

This problem should be solved in revision 389...

Changed in pyneighborhood:
status: Incomplete → Fix Committed
Revision history for this message
Betz Stefan (encbladexp) wrote :

Fixed with 0.5.1rc2

Changed in pyneighborhood:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.