Page 1 of 2

Network Samba Share Rox App

Posted: Tue 30 Oct 2012, 00:05
by 01micko
This app was originally written by kirk for Fatdog64 but works just as well in Slacko and Precise. It is a simple rox app where you just click it and it scans for shares, then it makes a drive icon for each share which you simply click and it shows the network share. If a password is needed a box pops up requiring the username and password.

The reason for this app is that Pnethood, while it has served us well for many years is often failing to discover network shares in the latest Puppies even though the shares exist. This is because it's major dependency nbtscan is getting old and largely unmaintained.

This is designed for home use. For a more heavy-duty solution use YASSM by rcrsn51. The next Slacko will be shipping with both in place of Pnethood.

This is tested working with XP, Windows 7, Mac and Puppy-samba shares. It is tested with the latest Slacko-beta, Precise Puppy and latest Wary/Racy Beta.

Once you install the pet there is a directory made in /root/network with the Network icon inside. Navigate to that and just click the Network icon to begin. There is no menu entry.

If you forget to unmount shares at shutdown then there is a service script to take care of that.

Warning: No warranty. There is the possibility that if you do something silly like deleting a mounted share then there will be data loss on the share. If you have problems just reboot.

Dependencies:
  • rox-filer
    mpscan (should be already there in most pups)
    mount.cifs (should be already there in most pups)
    smbclient (should be already there in most pups)
    base64 (only in latest pups - includes slacko-533, wary/racy-5.3,precise-5.4)
This will likely fail in Lupu, just test if base64 is there with

Code: Select all

which base64
EDIT:
update to 0.8 fixed issues with nounix and sec=ntlm thanks to shinobar and gcmartin

update to 0.7 fixed verbosity at boot, now echoes "ok", fixed guest password. (base64 error)

update to 0.6, improved unmounting at shutdown thanks to jamesbond

Posted: Tue 30 Oct 2012, 18:23
by peebee
Hi Mick

I'm afraid that this new app doesn't seem to work very well for me :(

I'm running samba on my desktop pc under slacko 5.3.3 - my system definitely falls into "home use" as I just use it to gain access to my files on my desktop from my laptop.

pnethood connects reliably and quickly under most puppies (I have reported speed problems recently with precise but these were fixed)

I loaded the new "final version" 5 of the app onto a pristine frugal install of slacko 5.3.6.5.

On my first attempt to connect nothing happened - the scanning message appeared and then after about 1 min disappeared again with no shares discovered.

On my 2nd attempt I did get a prompt box to enter a user name and password but this took a very long time to appear. A share was established and accessible.

For my setup this would be a retrograde replacement for pnethood as it currently stands.....

Thanks
Peter

Posted: Tue 30 Oct 2012, 19:07
by rcrsn51
@peebee: Can you do some testing? Using your network prefix, run this command. Note the spaces around the "-".

Code: Select all

mpscan -p 139 aaa.bbb.ccc.1 - aaa.bbb.ccc.254
Then

Code: Select all

mpscan -t 3 -p 139 aaa.bbb.ccc.1 - aaa.bbb.ccc.254
I find that mpscan is slower in Slacko than in other Puppies, but not as slow on my network as you are reporting.

Posted: Tue 30 Oct 2012, 22:09
by peebee
rcrsn51 wrote:@peebee: Can you do some testing?
Hi rcrsn51

Results:

Code: Select all

# mpscan -p 139 192.168.1.1 - 192.168.1.254
Timeout: 1
# mpscan -t 3 -p 139 192.168.1.1 - 192.168.1.254
Timeout: 1
Timeout: 2
Timeout: 3
Timeout: 4
Timeout: 5
Timeout: 6
Timeout: 7
Timeout: 8
Timeout: 9
Timeout: 10
Timeout: 11
Reach max number of timeouts
# 
For command #1 - the Timeout 1 output only appeared after 30-40 sec. For command #2 the outputs appeared at roughly 2 sec intervals.

Hope helps
Cheers
peebee

Posted: Tue 30 Oct 2012, 22:15
by rcrsn51
And in neither case did it find the target server. I'm curious - what other devices are connected to this network?

What happens if you probe the server directly with

Code: Select all

mpscan -p 139 aaa.bbb.ccc.ddd

Posted: Tue 30 Oct 2012, 22:36
by peebee
rcrsn51 wrote:And in neither case did it find the target server. I'm curious - what other devices are connected to this network?

What happens if you probe the server directly with

Code: Select all

mpscan -p 139 aaa.bbb.ccc.ddd
Just 2 devices:
- desktop pc ethernet direct wired to wifi router
- laptop over wpa wifi

Direct probe (from slacko 5.3.3 as that's what's loaded):

Code: Select all

# mpscan -p 139 192.168.1.69
ip: 192.168.1.69 139 OK
Your test commands seem to find the server on 5.3.3 but not on 5.3.6.5.....

I better try 5.3.6.5 again.....

Posted: Tue 30 Oct 2012, 22:47
by 01micko
I'm curious - what other devices are connected to this network?
Me too :) (ok saw post, no smart-phone, smart-TVs?)

In any case, The scan only needs to be done when you need to find new shares, the existing shares need not be updated.

kirk actually hacked mpscan in fatdog to time out quicker. I have that source and will compile soon. I just checked, and mpscan is a part of kirk's File-Sharing rox app present in all puppies. I compiled mpscan on the raspberry-pi so I can test how fast it is in SAP6 (provided I have smbclient, can't remember). I know the FIle-Sharing works fine in SAP6.

peebee, do you ever use that File-Sharing app? I'd be interested to know how fast/slow that is for you.

Posted: Tue 30 Oct 2012, 23:00
by peebee
01micko wrote:
I'm curious - what other devices are connected to this network?
Me too :) (ok saw post, no smart-phone, smart-TVs?)

peebee, do you ever use that File-Sharing app? I'd be interested to know how fast/slow that is for you.
No other devices - just the desktop and laptop....I'm a simple soul lol

No - haven't used the file-sharing app - not even sure I knew it existed - is it in the menu?? Where would I find it?

When I went back to 5.3.6.5 the direct command found the server. Then when I did rcrsn51's test command it also found the server but took a long time to finish with the Timeout output.

Actually pnethood sometimes doesn't find the server and a couple of presses of the rescan are needed - its almost like the server goes to sleep and has to be kicked back into action.

Posted: Wed 31 Oct 2012, 00:03
by rcrsn51
[Deleted]

Posted: Wed 31 Oct 2012, 03:51
by 01micko
Attached is kirk's mpscan source and accompanying binary compiled in slacko-5.3.6.5

If you want to recompile just run ./configure && make and strip the bin in the src dir with strip --strip-unneeded mpscan

Back up the old /usr/sbin/mpscan and replace with the new binary.

I can't see any difference.

-

BTW, it works (sort of) on the raspberry pi, but network_roxapp doesn't produce the win7 mounts. even though I get the prompt for a user and password. It's some weird error, probably to do with the fact that I had to install nearly all of debian samba, which links to kerberos and all the security stuff. The mac and my puppy share worked fine. I'll save that for another day.
NOTE: raspi users, please don't use on SAP6 because there is a potential data loss bug specific to the SAP6 OS and the network_roxapp.

Posted: Wed 31 Oct 2012, 09:23
by peebee
01micko wrote:Back up the old /usr/sbin/mpscan and replace with the new binary.
I can't see any difference.
:D :D :D

Hi Mick & rcrsn51

Big difference here....

Installed the "new" mpscan

Ran rcrsn51 tests - showed that it found my share.

Installed the network_roxapp-0.5.pet

Network scan found my share in an acceptable time - c. 10 secs

Share survived reboot.

Seems to have fixed it for me.

Many thanks
Peter

Posted: Wed 31 Oct 2012, 10:09
by 01micko
peebee wrote: Network scan found my share in an acceptable time - c. 10 secs
~
Seems to have fixed it for me.
Ok, good news :) . Even though I had no issues and and couldn't really tell the difference in speed, kirk must have seen something and made the appropriate adjustments. I haven't done a diff so as of now I don't know. Maybe I don't need to know :lol: .

I'll put the new binary in the next slacko beta.

Thanks.

Posted: Wed 31 Oct 2012, 11:19
by jamesbond
Note: some windows servers only listen on ports 445 instead of 139.

Posted: Wed 31 Oct 2012, 11:24
by 01micko
jamesbond wrote:Some note: some windows servers only listen on ports 445 instead of 139.
Yeah.. do you reckon it's worth running a second loop on failure ? Or maybe a 'help' file or README ? It's nice and simple how it is, more complication breeds complications .. :) . There is the config file, a readme file could point that out I guess.

Posted: Thu 08 Nov 2012, 12:51
by 01micko
Updated to 0.6

Changed the service script (run at shutdown) to ensure everything is killed before unmounting the shares, thanks to jamesbond

See main post

Posted: Sun 10 Feb 2013, 12:46
by 01micko
Updated to 0.7

See main post

nounix option

Posted: Tue 07 May 2013, 04:01
by shinobar
Using v0.7 on the precise puppy 5.5.
Cool, but i got error message when i put files in the mounted share.
I think we need 'nounix' option at mount. See the next post:
http://murga-linux.com/puppy/viewtopic. ... 2&start=15

sec=ntlm option

Posted: Sat 03 Aug 2013, 08:39
by shinobar
See the posts of gcmartin and shinobar:
http://www.murga-linux.com/puppy/viewto ... &start=187

Re: sec=ntlm option

Posted: Mon 05 Aug 2013, 02:20
by 01micko
shinobar wrote:See the posts of gcmartin and shinobar:
http://www.murga-linux.com/puppy/viewto ... &start=187
New version 0.8 is now in the main post, thanks!

Posted: Mon 05 Aug 2013, 16:11
by sunburnt
It`d be really nice for the top developers here to start making RoxApps.
I`ve said for awhile now that this is the direction for Puppy and Linux to go.

Pet packages, or any "installed" software take up Puppy`s Save file space.
For RoxApps and SFS, only the "config." files and /root stuff take up space.
No-install apps are easy to add and remove, and can contain their configs.

If apps are not installed, and other things that bloat the Save file like Firefox ( browser ) cache
are linked to a dir. on a partition, then the Save file only needs to be 64 MB to 256 MB in size.
.