pnethood - samba share mounter

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#181 Post by vtpup »

You're welcome. And thanks for writing this application for us.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#182 Post by HairyWill »

vtpup wrote:You're welcome. And thanks for writing this application for us.
wow, I'm not sure that anyone has said thank you before, now I wish it was more reliable.

I discovered today how to stop the irritating init_iconv messages output by smbclient. The secret was to include /opt/lib/samba/charset/CP850.so out of the full samba package. Kind of obvious really and the file is only 4k in size.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#183 Post by vtpup »

wow, I'm not sure that anyone has said thank you before,
There are 13,240 registered users on this forum.

It's an honor therefore to be the first.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#184 Post by vtpup »

I'm sure the holidays have kept you busy, Will.

In the meantime I've found an easy way to preset the Samba name resolution for my computer to find other computers on my small home LAN.

I use static addressing and this makes it possible to assign the names permanently. To resolve the names, you simply edit the lmhosts file to include the names and addresses of your computers. In my case, my lmhosts file is located in /etc/opt/samba/lmhosts.

As an example, the beginning of my lmhosts file looks like this:

Code: Select all

# T2: Samba lmhosts
#
# This file contains host maps for NetBIOS
# It is similar to the /etc/hosts file format
# See lmhosts (5) for more info.
#
# Format is:
# 0.0.0.0 NetBIOS_Name

192.168.1.121 cheryl-desktop
192.168.1.111 steve-desktop
192.168.1.116 tp6samba
I saved that as a test, and pnethood was able to open and resolve the names instantly. It also got rid of the pnethood problem I had, where it showed samba server names, but didn't show the available shares. Now everything appears instantly. This file can be copied to each of the computers on the network.

There are other methods of Samba name resolution.

1.) lmhosts file
2.) hosts file
3.) broadcast
4.) DNS
5.) WINS server

here is a good reference page for these methods:

http://oreilly.com/catalog/samba/chapte ... 07_03.html

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#185 Post by HairyWill »

Thanks vt that looks very interesting.
I wonder if there is any way of discovering a WINS (server) without doing a broadcast? I can't see how unless you can get that information from a dhcp server if your addressing is dynamic.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#186 Post by vtpup »

Will, I don't know about automatic discovery, I imagine you probably have to enter the address manually in a config file somewhere. In Win 98, (the only one I occasionally now use) I think it is entered in Network Neighborhood under TCPIP properties. Maybe also it goes in lmhosts? -- in Windows you can enter the type of host as well as just the IP address in the lmhosts file.

To create a WINS server is easy in Samba server -- you just add one line in the config and it knows what to do. You can also specify another WINS server instead, if you want.

We're dealing with clients here though. And of course from your program's point of view, auto-discovery would be preferable to manual user entry.

If I find out any more, I'll let you know.

For anybody interested, here's part of a commented smb.conf showing applicable sections:

Code: Select all

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = workgroup

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
;   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

User avatar
claude
Posts: 150
Joined: Sat 14 Apr 2007, 16:11
Location: Saint-Jérôme, Qc

pnethood

#187 Post by claude »

Is there a way to save in pnethood.rc the username used in a pnethood session ?

Thank you very much.

Claude

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#188 Post by HairyWill »

providing you have ticked the box to "save passwords" login credentials are stored in ~/.pnethood/passwords. Each line in this file takes the form
MACHINENAME:USERNAME:PASSWORD
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
claude
Posts: 150
Joined: Sat 14 Apr 2007, 16:11
Location: Saint-Jérôme, Qc

pnethood

#189 Post by claude »

Thank you very much Will,

That is exactly what I wanted.

Best regards

Claude

ragaman
Posts: 186
Joined: Sun 14 Jan 2007, 12:55

#190 Post by ragaman »

I too am having problems with Pnethood, having switched from Wnop to MiPup2. Can Pnethood now open passwordless shares? I've changed my network pc's to static IP as done by vtpup. Still no dice. Though the XP shares are listed, I am refused access.

P.S.

Right after posting this, I tried pnethood x.x.x.x (IP Address of my XP machine which has passwordless shares), did not make any entry on the username and typed a single space (I was desperate) as password. It worked!

User avatar
paulh177
Posts: 975
Joined: Tue 22 Aug 2006, 20:41

#191 Post by paulh177 »

Will I wondered (without reading all the pnethood threads) if it would be relatively straighforward to port pnethood to Ubuntu ?
(mounting windows shares seems a matter of interest to the 'buntu fbs on my ISP's forum -- it seems very difficult and complicated ...)

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#192 Post by vtpup »

It is only dificult in Ubuntu because of firewall setting and similar issues, which wouldn't be solved by Pnethood. It would require the same setup process to see shares.

It is easy to mount a Windows share on Ubuntu, otherwise.

Click Places>Connect to Server. Fill in the share details.

It leaves you with a share bookmark and an Icon to click on to open the share.

This is not to say that Pnethood couldn't be ported to Ubuntu. . . .if I'm allowed a double negative by way of not properly answering a question properly directed to another.
Last edited by vtpup on Sun 11 Jan 2009, 21:00, edited 1 time in total.

User avatar
paulh177
Posts: 975
Joined: Tue 22 Aug 2006, 20:41

#193 Post by paulh177 »

you can use as many double negatives as you like (although this is still a wonderful read if you like not unblack dogs
more to the point, i never use ubuntu and am never likely to but i was interested to know anyway

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#194 Post by vtpup »

What I wouldn't give to know more of such minorities as you have preferred to me by your referential pointing. I am not unaware of such a lack in the improper, as exhibited in the knowledge department, of our young scribblers, while we float lonely on a sea of lingual proprieties, dipping out cods with a gaff.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#195 Post by HairyWill »

@ragaman
thanks for the feedback
The more irritating little problems I see with pnethood the more I realise that all the collected network data/configuration should be written out to temporary files before building the interface.

@Paul
I did have an earlier incarnation of pnethood running on debian. You would need to ensure the dependencies on gtkdialog, nbtscan, samba were satisfied and the scripts func_mount and func_umount would need a liberal sprinkling of sudo. There are also dependencies on rxvt and rox but you should be able to replace these in the code with alternatives. I agree with VT, it is unlikely to help solve your problems.

I seem to remember that browsing windows shares on debian was simply a matter of clicking (double :yuck:) on network, then workgroup, then server, then share and entering a password.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

ragaman
Posts: 186
Joined: Sun 14 Jan 2007, 12:55

#196 Post by ragaman »

Using static IP's, I can now access all the samba shares from my Windows XP and Ubuntu PC's. Thanks Hairywill and vtpup.

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#197 Post by GeoffS »

First - pnethood is wonderful. I could handle the alternatives however it was far too difficult for my wife :( So thank you very much HairyWill.

However I've encountered a rather odd bug which I can't find reference to.

I run a 4 port router with an 8 port SOHO switch downstream from the router. Pnethood on a computer connected to the switch can't find the server which is connected directly to the router.
If I plug the client computer directly to the router pnethood finds the server OK.
If I ping the server from the client computer, ping sees the server, and pnethood works OK from then on. Until I reboot that is.
As you can see, the problem has an easy workaround (which my wife can handle :D ) but - why?
Further - the problem does not occur with an old 32 port switch with screaming fans! The fans being why I'm now using the little SOHO switch.
I tried lengthening the scan time but it made no difference.

Both the server and the client are running puppy 4.00.
Pnethood is the latest 0.65.

Cheers
Geoff

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#198 Post by HairyWill »

thanks for the report Geoff
GeoffS wrote:Until I reboot that is.
the switch
the client
or the server

some thoughts
I think that some network admins configure their devices not to transmit netbios across subnets. (this doesn't explain why it works after a ping)

A ping would force the switch into setting up a route between the two computers. Maybe if the route doesn't exist already then then switch doesn't forward the udp broadcast from nbtscan. (I would expect the switch to hold the route until the switch was rebooted or it was explicitly removed)

Is the server shown with no shares or is it just not shown at all?
Does it work if you start pnethood from the commandline and specify the address of the server (one of the options below is definitely broken, but I cannot remember which)

Code: Select all

pnethood SERVER_NETBIOS_NAME
or

Code: Select all

pnethood IP_ADDRESS
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#199 Post by GeoffS »

Thanks for the prompt reply -
I think you got the correct message - I should have said 'until I reboot the CLIENT computer'.
Now, to answer the other questions.
I fired up four computers as follows:-
Named OS Connection Address
ServerPC Puppy 4.00 Router Port 1 192.168.1.100
WinXP XP Router Port 3 192.168.1.97 (static)
IntelPup Puppy 4.00 Switch Port 7 192.168.1.102
PVR XP Switch Port 3 192.168.1.101

The address reflect the order the computers were booted apart from WinXP which uses a static address to keep it away from the Internet.

IntelPup - Pnethood saw NO servers

Did ping 192.168.1.100

IntelPup - Pnethood found ServerPC AND WinXP
Repeated refreshes failed to find PVR.

Rebooted IntelPup
IntelPup - Pnethood found no servers (note I have not reset the switch)
Pnethood 192.168.1.100 (ServerPC) worked
Pnethood 192.168.1.101 (PVR) worked
Pnethood 192.168.1.97 (WinXP) worked
and of course, after all that, gui Pnethood found them all.

Thats about it.
Hope you can follow the first few lines, it is supposed to be a table but, of course, this system won't allow tabs and renders multiple spaces as single spaces. Is there a way?

Certainly not an urgent problem, more just a curiosity and easily worked around, just have to leave a few paper notes for other people :)
Cheers
Geoff

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#200 Post by vtpup »

Rather than posting notes, wouldn't this work?

in /etc/opt/samba/lmhosts :

Code: Select all

# T2: Samba lmhosts
#
# This file contains host maps for NetBIOS
# It is similar to the /etc/hosts file format
# See lmhosts (5) for more info.
#
# Format is:
# 0.0.0.0 NetBIOS_Name

192.168.1.100 ServerPC
192.168.1.97 WinXP
192.168.1.102 IntelPup
192.168.1.101 PVR

Post Reply