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 Fri 19 Sep 2014, 03:58
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
pnethood - samba share mounter
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 20 [288 Posts]   Goto page: 1, 2, 3, ..., 18, 19, 20 Next
Author Message
HairyWill


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

PostPosted: Sun 11 Nov 2007, 06:53    Post subject:  pnethood - samba share mounter
Subject description: version 0.65
 

Now at version 0.65
<edit date="14/02/20010">
I'm updating this post for historical accuracy. The latest version of pnethood I released is 0.65. I believe that there is a later version circulating with a small patch to the mount command to support UTF-8.

A number of puplets and Barry's current development releases are now using Patriots lameSMBxplorer instead. It is unlikely that pnethood will be developed further so if neither pnethood or lameSMBxplorer work for you it is probably better to report a bug against lameSMBxplorer.
</edit>

This GUI is for mounting windows samba shares on your puppy pc. It is intended to be simpler to use than linneighborhood especially for use on small home networks.
The screenshot below shows pnethood 0.5 with an error message visible. For those interested in visual friparary the screenshot was taken in pup214R using the debian red gtk theme with jwm set to match.



Project Status

Depends On:

* smbclient
* smbmount
* rox (filer needed to show open a window once share is connected)
* rxvt (needed to view the log)
* (all of the above are included in the basic iso for recent puppys)
* nbtscan (included in the pet)

Done:

* separate show/connect/disconnect buttons
* entry in the network menu
* separate tabs for each machine
* separate authentication details for each server
* rescans server with password if annoymous scan fails
* if password scan fails, checks mount to see if any shares are already mounted from that server
* inbuilt limit of 10 servers scanned, once this limit is exceeded you get a list of all servers and are asked to choose one.
* server and share names with spaces, dots and hyphens should work (only partially tested, may cause name collisions ie: my-server and my_server)
* servers may be specified by IP address
* scan includes every network interface, except ppp ones. I can't see why you would want to scan a ppp interface, it was taking ages and taking down my pptp vpn connection
* tabs are always shown for servers with shares that are currently mounted
* status, error handling and reporting (can't really be improved much without further user feedback)

To Do

* Allow user with more than 10 machines to select a new one without rescanning the entire network
* Handle servers with lots of shares. This will probably mean changing the interface implementation to use gtkdialog tree instead of buttons. This is a shame because I like the buttons.
* replace nbtscan with a scan that works with netbios over tcp/ip, this will probably just be a backup in case nbtscan produces nothing
* cifs support
* find a better way of dealing with passwords
* allow user to control how long nbtscan waits for servers to identify themselves
* move the mountpoint into /mnt somewhere

Known Bugs

Could run out of screen space for large numbers of shares.

nbtscan

This program relies on nbtscan for super faster scanning of your network to find machines to check for shares. Thanks to Alla Bezroutchko. Nbtscan relies on the NetBIOS protocol. If your windows computer is running Windows 2000 or above though it is possible that NetBIOS has been disabled. The default is for it to be enabled so it is likely that nbtscan will work.

If you are interested in building nbtscan yourself it is available here: http://www.inetcat.net/software/nbtscan.html
pnethood-0.65.pet
Description 
pet

 Download 
Filename  pnethood-0.65.pet 
Filesize  38.28 KB 
Downloaded  1318 Time(s) 
pnethood-0.5.pet
Description 
pet

 Download 
Filename  pnethood-0.5.pet 
Filesize  35.96 KB 
Downloaded  2310 Time(s) 

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss

Last edited by HairyWill on Sat 13 Feb 2010, 23:05; edited 21 times in total
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 11 Nov 2007, 07:42    Post subject:  

So it doesn't need the Samba utilities at all?
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


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

PostPosted: Sun 11 Nov 2007, 08:37    Post subject:  

BarryK wrote:
So it doesn't need the Samba utilities at all?

I'm not a magician Wink
It uses smbmount and smbclient plus any dependencies they have and nbtscan which is only a few k. It works in the experimental dingo release without installing anything else. The nbtscan timeout is currently set for 1 second, I think this could do with upping a bit.

it doesn't need
smblookup
which gfilemanager was complaining about

When complete my intention is that all the gui contains will be username and password boxes, mount/unmount buttons and a refresh button.

Because it automatically lists all shares it may need extending in some way to cope with larger networks and +20 shares, to avoid excessive scan times and running out of screen space.

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


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 12 Nov 2007, 17:56    Post subject:  

Ah, I've just realised something. Dingo has 'nmblookup', 'smbclient', 'smbmnt', 'smbmount', 'smbspool', 'smbumount'.

There is no 'smblookup' in the Samba package, I just checked the original full package.

Will, could you test something -- try creating a symlink smblookup to nmblookup, see if that makes Gfilemanager happy.

Ah, no, there may be a difference. See this package:
http://gnu.rtin.bz/directory/all/gsmbscanner.html

This site has a PHP script for smblookup:
https://trac.anl.gov/scavenger/browser/trunk/scanner/process/smblookup.php
...it just calls nmblookup, with certain parameters.

...so, we should be able to create a 'smblookup' also, to satisfy Gfilemanager, maybe get it from that gsmbscanner package.
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


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

PostPosted: Thu 15 Nov 2007, 09:30    Post subject:  

now at version 0.2
As this is still very much in the testing phase it would be great to get any feedback even if it is just "it works" or "it doesn't work"

Barry
I have replied on your latest blog including patched src for gfilemanager which doesn't mount shares locally.

Bumped to version 0.21 to fix small but deadly bug in subnet calculation

Done
separate show/connect/disconnect buttons
label to show status
entry in the network menu

To Do
better status reporting
error handling and reporting
automated rescanning with password if anonymous scan fails
replace nbtscan with a scan that works with netbios over tcp/ip

Bugs
fails to scan if all the shares from my server are mounted
if mount fails buttons and label still indicate success (workaround click disconnect then try connect again)

version 0.21 received 21 downloads

_________________
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: Sun 18 Nov 2007, 16:32    Post subject: pnethood 0.3
Subject description: uploaded
 

Now at version 0.3
Some testing feedback would be really helpful especially to trap any complaints from servers that are not being handled properly. I've run out of error states on mine but there must be loads more.

Done:

* some error handling and reporting
* automatically caculates x.x.0.0/16 subnet to scan from your IP address
* status of each operation reported at bottom of screen
* separate tabs for each machine
* separate authentication details for each server
* rescans server with password if anonymous scan fails
* if password scan fails, checks mount to see if any shares are already mounted from that server

To Do

* Implement an inbuilt limit on the number of servers scanned, once this limit is exceeded it should just present a list of all servers and ask the user to choose one.
* Handle servers with lots of shares. This will probably mean changing the interface implementation to use gtkdialog tree instead of buttons. This is a shame because I like the buttons.
* better status reporting
* error handling and reporting
* replace nbtscan with a scan that works with netbios over tcp/ip

Known Bugs

Could run out of screen space for large numbers of shares or servers
Error not handled if you don't have an IP address
nbtscan described twice in the help

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

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

PostPosted: Tue 20 Nov 2007, 04:35    Post subject:  

With a very simple Win98 network setup with no passwords or anything that works fine with linNeighborhood:
Code:
~# pnethood "192.168.2.1"
cat: /root/pnethood/.passwords/192.168.2.1username: No such file or directory
cat: /root/pnethood/.passwords/192.168.2.1password: No such file or directory
Error connecting to 192.168.2.1 (Connection refused)
cat: /root/pnethood/.passwords/192.168.2.1username: No such file or directory
cat: /root/pnethood/.passwords/192.168.2.1password: No such file or directory
and it says "no shares",

or running with no inputs:
Code:
~# pnethood
EXIT="abort"
/usr/local/pnethood/pnethood: line 152: 31124 Terminated              gxmessage "Pnethood scanning network, please wait"
and it says "Failed to bind: address already in use"
Back to top
View user's profile Send private message 
HairyWill


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

PostPosted: Tue 20 Nov 2007, 05:20    Post subject:  

thanks for the reply
It currently expects a machine name not an ip address as a parameter
ie
pnethood "myserver"
good point though, I will implement handling of IP addresses

I haven't included for access to password-less shares yet so I expect the smbmount command string will be wrong for you. I need to crank down the security on my server to test this.

the output of
Code:
 ifconfig | grep inet| grep -v "127.0.0.1" | sed 's/ *inet addr://g;s/ .*//g'| cut -d . -f 1-2
would be helpful

I realised last night that the subnet calculation just assumes a single active network interface excluding loopback. I suspect that line 23 of /usr/local/pnethood/pnethood needs a "head -n 1" inserted before sed./usr/local/pnethood/pnethood

add to todo
password-less shares
specifying server by ip
calculate subnet using the right interface - The only time this goes wrong for me is if I have a VPN tunnel open, the right one is always output first I presume because of alphabetic ordering. I wish that hostname -i worked properly, but /etc/hosts is not formatted/maintained correctly. I suppose I do need to use route to calculate the subnet.

thanks for the feedback

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

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

PostPosted: Tue 20 Nov 2007, 05:39    Post subject:  

The output is 192.168 (My IP should be 192.168.2.33, the router is .2.1 and the "server" I want to connect to is .2.36)
I only have one active interface, but that is a good point to take into account Smile

Your thing about line 23 doesn't make sense - maybe you have a later version that you've uploaded? Or is there a typo there?
Back to top
View user's profile Send private message 
HairyWill


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

PostPosted: Tue 20 Nov 2007, 15:11    Post subject:  

Disciple I presume that as you are talking about win98 it is using raw netbios and not netbios over tcp/ip which is on my todo list.

What version of puppy are you running?
Does the server have a name, maybe
pnethood name
will work for you?

What output do you get for
nbtscan 192.168.2.0/24
if that works I would be interested to confirm that
nbtscan 192.168.0.0/16
does as well

regarding line 23 discussed above, yes, I pasted something in by mistake there shouldn't be "./usr/local/pnethood/pnethood" after "sed" but I think we've ruled that line out as the cause anyway.

pnethood sends debugging output to /tmp/pnethood-log
and the gui xml to /tmp/pnethood-gui

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


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Tue 20 Nov 2007, 16:58    Post subject:  

I tried to use pnethood.
My configuration:
- Desktop (XP)
WiFi device at 192.168.1.2
ETH1394 device at 10.0.10
- Laptop (3.01)
WiFi device at 192.168.1.3
ETH1394 at 10.0.11

I started pnethood to do discovery of the network.
The window says scanning network please wait.
That windows stays forever until I push ok, but nothing is discovered.

Both PC sea each other with pin as well with the WiFi devices as with the ETH1394 devices.

Three pnethood processes are generated.
They stay there forever unless I kill them.

Then I tried LinNeighborhood on Puppy.
The Desktop is found, scanned and the shares found, which I can mount.

Where does it go wrong with pnethood?

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
HairyWill


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

PostPosted: Tue 20 Nov 2007, 17:38    Post subject:  

Beem,
Thanks for the feedback.
The subnet calculation doesn't work properly if you have more than one working network interface, I will patch this in the next couple of days.

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


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Tue 20 Nov 2007, 17:54    Post subject:  

Ok, HaiyWill, I'll watch this thread.
_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
davec51

Joined: 13 Apr 2006
Posts: 491
Location: Virginia

PostPosted: Tue 20 Nov 2007, 22:08    Post subject: Samba Share Mounter
Subject description: Won't Connect for Me
 

I have always used Lin Neighborhood with no trouble for my wired connection with an XP in the next room. I tried pnethood, but it wouldn't connect, no matter what I tried. I might add that I'm technically hopeless.
Back to top
View user's profile Send private message 
disciple

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

PostPosted: Wed 21 Nov 2007, 02:53    Post subject:  

It works great if I use pnethood name Smile
It does say
Code:
timeout connecting to 192.168.2.36:445
in the terminal, but it works fine Smile

Quote:
Disciple I presume that as you are talking about win98 it is using raw netbios and not netbios over tcp/ip
I don't know how to figure that out sorry Sad

Code:
~# nbtscan 192.168.2.0/24
Doing NBT name scan for addresses from 192.168.2.0/24

IP address       NetBIOS Name     Server    User             MAC address     
------------------------------------------------------------------------------
192.168.2.0     Sendto failed: Permission denied
192.168.2.33     GREEN ROOM       <server>  GREEN ROOM       00-00-00-00-00-00
192.168.2.36     TOMS             <server>  HOOD             00-50-ba-b0-c7-ca

~# nbtscan 192.168.0.0/16
Doing NBT name scan for addresses from 192.168.0.0/16

IP address       NetBIOS Name     Server    User             MAC address     
------------------------------------------------------------------------------
192.168.2.0     Sendto failed: Permission denied
192.168.2.33     GREEN ROOM       <server>  GREEN ROOM       00-00-00-00-00-00
192.168.2.36     TOMS             <server>  HOOD             00-50-ba-b0-c7-ca


The log just says
Code:
Failed to bind: Address already in use
if I just run pnethood.

Sorry - I don't know why I posted the output from when I tried with the router IP address (I wasn't really sure at that stage what you meant by the host - must have worked too long that day Smile ).

Here's what I should have posted:
Code:
~# pnethood "192.168.2.36"
timeout connecting to 192.168.2.36:445
timeout connecting to 192.168.2.36:445
timeout connecting to 192.168.2.36:445
/usr/local/pnethood/pnethood: line 150: kill: (2729) - No such process
and the log says
Code:
Scan: subnet 192.168.2.36 complete
timeout connecting to 192.168.2.36:445
timeout connecting to 192.168.2.36:445
timeout connecting to 192.168.2.36:445
192.168.2.36 reports no shares, maybe annonymous scan failed, trying again with password
session request to 192.168.2.36 failed (Called name not present)
session request to 192 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
192.168.2.36 still reports no shares, checking mount to see if I have them all mounted already
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 20 [288 Posts]   Goto page: 1, 2, 3, ..., 18, 19, 20 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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.2683s ][ Queries: 12 (0.0770s) ][ GZIP on ]