Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 23:06
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
lameSMBxplorer v0.2.2 beta
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 8 [112 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Thu 07 Jan 2010, 03:56    Post subject:  

[quote="eden6000"when I click on a server the only thing it does is "LookUpShares:192.168.x.x"[/quote]

Well that's easy you need to replace the x.x's with numbers, lol just kidding Wink
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
eden6000

Joined: 08 Apr 2007
Posts: 259

PostPosted: Thu 07 Jan 2010, 04:27    Post subject:  

newbie, ok....not that much......
Smile
Back to top
View user's profile Send private message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Thu 07 Jan 2010, 04:29    Post subject:  

Hmmm .....

ttuuxxx wrote:
..... does it remember the user name and passwords?
If so maybe some sort of stored password encryption might be better.

Currently it does not save username/password. Still evaluating password storage method possibility.

ttuuxxx wrote:
..... Also maybe a puppy shares might be nice Smile Like if you have 2 puppy pc's running and when you install lameSMBxplorer it makes a /root/My-Shares folder that is automatically shared with other puppy pc's on the network.
ttuuxxx

I've already prepared a set of minimal samba server package. My intention is to allow folder sharing ala WinXP simple shares (share level security: guest / user+password style ... ). The configuration applet is already on the drawing board though implementing it properly will need a bit of time. The catch ? ..... the size of minimal samba server is at 6MB+ ... Wink

eden6000 wrote:
..... but nothing happens the same .....

Bummer ... well, I half expected it ... Thanks for the feedback, I'll just have to find a win server to figure this out properly ... please be patient as this may take a little while .....


Rgds
Back to top
View user's profile Send private message 
eden6000

Joined: 08 Apr 2007
Posts: 259

PostPosted: Thu 07 Jan 2010, 04:36    Post subject:  

Quote:
please be patient as this may take a little while

sure Patriot, thanks for your work instead Smile
Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Sun 10 Jan 2010, 16:00    Post subject:  

a few problems here
Code:
   SvrNBT=${SvrNBT#*|}; SvrNBT=${SvrNBT/|*}
   SvrMAC=${OneServer/*|}
   # This filter needs rethinking ...
   if [ "$SvrMAC" = "00-00-00-00-00-00" ]; then
     shrList=$(smbclient -g $cred -L $SvrIP 2>&1)
   else
     shrList=$(smbclient -g $cred -L "\\$SvrNBT" 2>&1)
   fi
these upset the call to smbclient
1. SvrNBT may have white space on the end
2. smbclient is not recognising a space inside cred
3. I don't think this is causing a problem but are you sure the correct number of backslashes are passed. I think forward slashes work as well.

I have a samba server that advertises its mac as 00-00-00-00-00-00. I am interested in the reason behind handling this case differently.

Whilst the interface looks good to me I think that hard coding the font size in your gtkrc makes it somewhat inflexible. This could cause a problem for the visually impaired and also be irritating for people who get wound up about having a consistent theme.

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Mon 11 Jan 2010, 10:49    Post subject:  

2. Above happens because smbclient gets upset about the modified IFS.
This is particularly nasty if you try mounting a share as a user with no password. Smbclient hangs waiting for a password on stdin, for me this locked up X completely.

Here is a patch for 1. and 2. I have also enabled three extra icons that show when smbclient is still scanning, there are no shares to mount, the share is currently mounted. Supply your own icons.

I have backgrounded the smbclient scan (I know you are not keen) This might create a race condition editing the server shares file if the user keeps clicking the server. (I'm too tired and not sure). It ought to be possible to run all the smbclient calls in parallel. If I tried starting this on my machine at uni nbtscan, might manage to return 100 servers in 1 second this would keep smbclient busy for a very long time. I realise that environment is somewhat extreme but it might be worth considering

Another use case you might consider is allowing direct entry of the ip of a server to connect to.

Code:
--- /usr/local/lameSMBxplorer/lameSMBxplorer   2010-01-03 00:08:08.000000000 +0000
+++ lameSMBExplorer.hw1   2010-01-11 14:24:54.000000000 +0000
@@ -87,6 +87,9 @@
 style "gtk-smb-tree" {
  stock["lamesmb-server"] = {{"lamesmb.png"}}
  stock["lamesmb-share"] = {{"lameshr.png"}}
+ stock["lamesmb-noshares"] = {{"lamenoshrs.png"}}
+ stock["lamesmb-scanning"] = {{"lamescanning.png"}}
+ stock["lamesmb-mounted"] = {{"lamemounted.png"}}
  base[NORMAL] = "#FFFFF0"
  text[NORMAL] = "#0041BD"
  GtkTreeView::odd_row_color = "#f4f4f4"
@@ -171,9 +174,17 @@
   OIFS=$IFS; IFS=$'\n'
   for OneServer in $(<$nbtFile)
   do
+   IFS=$OIFS
    SvrNBT=${OneServer#*|}
    SvrIP=${SvrNBT}; SvrIP=${SvrIP/|*}
-   SvrNBT=${SvrNBT#*|}; SvrNBT=${SvrNBT/|*}
+   echo "lamesmb-scanning|..Still Scanning..|lameSMBExplorer">"$shrFile.$SvrIP"
+  done
+  for OneServer in $(<$nbtFile)
+  do
+   IFS=$OIFS
+   SvrNBT=${OneServer#*|}
+   SvrIP=${SvrNBT}; SvrIP=${SvrIP/|*}
+   SvrNBT=${SvrNBT#*|}; SvrNBT=${SvrNBT/|*}; SvrNBT=$(echo $SvrNBT | sed 's/[ ]*$//')
    SvrMAC=${OneServer/*|}
    # This filter needs rethinking ...
    if [ "$SvrMAC" = "00-00-00-00-00-00" ]; then
@@ -191,7 +202,8 @@
    if [ "$shrList" ]; then
      echo "$shrList" >"$shrFile.$SvrIP"
    else
-     :>"$shrFile.$SvrIP"
+     #:>"$shrFile.$SvrIP"
+   echo "lamesmb-noshares|..No Shares..|lameSMBExplorer">"$shrFile.$SvrIP"
    fi
    [ "$shtty" ] && echo "$shrList">$shtty
   done
@@ -201,8 +213,28 @@
 
 function LookUpShares()
 {
+  :>$shrFile
   [ "$shtty" ] && echo "LookUpShares:$ServerIP">$shtty
-  cp "$shrFile.$ServerIP" $shrFile
+  nbtName=$(awk -F"|" '{if ($2 == "'$ServerIP'") {print $3"|"$7}}' $nbtFile)
+  dmnName=$(echo ${nbtName#*|})
+  nbtName=$(echo ${nbtName/|*})
+  OIFS=$IFS; IFS=$'\n'
+  for OneShare in $(<"$shrFile.$ServerIP")
+  do
+   IFS=$OIFS
+   ShareName=${OneShare#*|};ShareName=${ShareName/|*}
+   mountchk=$($imount | grep -c "/mnt/network/$nbtName/$ShareName ")
+    if [ $mountchk -eq 0 ]; then
+      if [ "${OneShare#*|*|}" = "lameSMBExplorer" ]; then
+        echo ${OneShare} >> $shrFile
+      else
+        echo 'lamesmb-share|'${OneShare#*|} >> $shrFile
+      fi
+    else
+      echo 'lamesmb-mounted|'${OneShare#*|} >> $shrFile
+    fi
+  done
+  cp $shrFile "$shrFile.$ServerIP"
 }
 
 function MountShare()
@@ -366,7 +398,7 @@
   $gtkdApp -p lameScanBox -c 2>&1 >/dev/null &
   spid=$!
   ScanNBT
-  FindShares
+  FindShares &
   [ -e /proc/$spid ] && kill $spid &>/dev/null
 }
 

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Tue 12 Jan 2010, 06:56    Post subject:  

More tweaking of lameSMBxplorer in 0.1.1 alpha
I have backgrounded all the calls to smbclient and run them in parallel (up to 6 at a time). The main window is up in less than 2 seconds and by the time I've managed to click on a server its shares list is ready 99% of the time. The scan progress window is pretty much redundant now and only gets to 10-15% anyway.

My Win 7 machine has a gigabit connection to my samba server through a single switch. When I first try to browse the network on it there is a delay of over 30 seconds while windows scans the network. What the hell is it doing!
lameSMBxplorer.gz
Description 
gz

 Download 
Filename  lameSMBxplorer.gz 
Filesize  4.54 KB 
Downloaded  570 Time(s) 

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Tue 12 Jan 2010, 15:33    Post subject:  

Hmmm .....

HairyWill wrote:
...
1. SvrNBT may have white space on the end
2. smbclient is not recognising a space inside cred
3. I don't think this is causing a problem but are you sure the correct number of backslashes are passed. I think forward slashes work as well. ...


Thanks Will, I'll have them all fixed for next update ... No 1 & 2 above is my bad and no 3 is my typo ..... I've grabbed your patch and will see how it goes ...

The next update may probably be sometime next week (if not sooner)... I'm currently on limited dial-up as I got hit by a sudden lightning "storm" yesterday ... A few of my PSUs were toasted crispy ... so, it'll be a few days for me to get back to normal ... our ISP is also working on getting my line back up as we have determined that my line equipment is unaffected ...

In the mean time, I was allowed access to a win2003 server for a week to work on the connection issues.


Rgds
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2631
Location: Japan

PostPosted: Thu 14 Jan 2010, 21:50    Post subject: mount options
Subject description: iocharset=utf8 and...
 

Hi patriot,
I am testing version 0.1.1 alpha.
Nice program.

Two issus as for the mount options.
1st: file_mode and dir_mode require 4 digits.
2nd: iocharset should be set to 'utf8'.

Next is the diff.
Code:
# diff  lameSMBxplorer.old  lameSMBxplorer
224c224
<   mntOpts=$mntOpts",uid=0,gid=0,file_mode=755,dir_mode=755"
---
>   mntOpts=$mntOpts",uid=0,gid=0,file_mode=0755,dir_mode=0755,iocharset=utf8"

tnx
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6458
Location: Auckland, New Zealand

PostPosted: Fri 15 Jan 2010, 01:28    Post subject:  

Good work guys Smile

It would be nice if it printed the actual commands it runs to the terminal.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3393
Location: Oregon

PostPosted: Tue 19 Jan 2010, 01:47    Post subject:  

Running Puppy 431.
Wired network PC running XP and filesharing set up on it.
Pnethood finds the XP PC fine and also finds the shares on it as SharedDocs and $Print.
I can supply a username and mount the SharedDocs.

But....
LameSMB finds the XP PC.
When I single-click on the XP PC shown under server, it shows No Shares.

If I supply a username and hit refresh, it is forever scanning.

So what am I doing wrong?
Back to top
View user's profile Send private message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Wed 20 Jan 2010, 08:15    Post subject:  

Hmmm .....

8-bit wrote:
Running Puppy 431. ........
When I single-click on the XP PC shown under server, it shows No Shares. ..........

Please check whether it is a simple share or not. If its not, please use v0.1.3b and set the global user/password options and re-scan again ... Kindly let me know how it goes .....


Rgds
Back to top
View user's profile Send private message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Wed 20 Jan 2010, 08:21    Post subject:  

Hmmm .....

There was a reason for the MAC address filter. In a network without proper (windows) DNS/WINS/Hosts, name resolution for samba server seems to intermittently fail (with smbclient) and there's a long delay before it timeouts (ex: on small networks with dhcp/internet access). There are two (2) quick solutions that I know of :
a) client smb.conf is configured to a valid WINS server and the samba server is registered on said WINS server (yes, smbclient does parses smb.conf).
b) query using the samba server IP address.

Proper WINS configuration of smb.conf file cannot be relied upon as in a small network environment (which is the current scope of lameSMBxplorer), a WINS server is regularly non-existent (that's the case I usually encounter anyway). As far as I know (and yeah, I don't know much), there is no known guaranteed method to find a WINS server availability. It is a known "feature" of samba servers to return zeros MAC (due to the overhead required to provide such functionality) and so I'm using this filter to speed up samba server queries.

I like the parallel smbclient runs, it does seem to speed things up. I'd need a bit more time to see how to balance it nicely and to be considered for later ... For now, smbclient will use bcast+wins scanning to reduce delay. A background browse cache method is on the drawing board and will be worked on soon ...

I've spent two days worth of fiddling with connections to a win2003 server, lameSMBxplorer is now able to scan and mount shares properly. For scanning, the global username and password should be set accordingly. Mounting a win2003 shares should generally work okay provided that you have the correct access rights ...

I've seen reports on the net of NAS using incompatible SMB protocol (modified/proprietary implementation). If anyone is having issues with such a NAS device, please check with the manufacturer regarding the OS that it supports. Workaround connection to such a NAS may be possible but it depends on what was changed, etc ...

Thanks and appreciation goes to eden6000, HairyWill and shinobar for their input ...


Rgds
Back to top
View user's profile Send private message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Wed 20 Jan 2010, 08:31    Post subject: released: lameSMBxplorer v0.1.3 beta  

Hmmm .....

Good things comes to those who wait ..... Smile

I've been working on the connection issues for the past week. Many many small but important changes were made between v0.1.1a and v0.1.3b (v0.1.2a is an internal test version and was not released).

Highlights of v0.1.3 beta:
1. Share mount status icon implemented. (Widget refresh method is being reviewed).
2. Option to close any fuser when un-mounting share(s).
3. Avoid external dns lookups (for dhcp net connections) by resetting samba generic cache on startup. This results in quicker name resolution for NBT name query.
4. Server share query time reduced by using bcast+wins only.
5. Global options saving function implemented.
6. Initial tests with win2003 server connections was successful.
7. Many bugs were squashed and several suggestions was considered for implementation.

Note: domain/user/password is stored in plain text. However, these are not saved by default and will only be saved if selected in the global option (there's no point password encryption of password). If security is of utmost importance to you, do not save them.

Currently, the background browse cache is not yet available. It is a separate script option that starts on bootup. Once (if) integrated, shares listing is expected to be similar to windows behaviour. However, this may take a while to properly implement.


Rgds
Back to top
View user's profile Send private message 
eden6000

Joined: 08 Apr 2007
Posts: 259

PostPosted: Wed 20 Jan 2010, 10:49    Post subject:  

Hi Patriot, great work! Now it scans and correctly connects to the shared servers...I think some additional work can be done on the scanning time, as in my network it takes about 50 seconds to scan the entire network (but consider that we have around 100servers....)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 8 [112 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1124s ][ Queries: 12 (0.0074s) ][ GZIP on ]