pnethood - samba share mounter
wow, I'm not sure that anyone has said thank you before, now I wish it was more reliable.vtpup wrote:You're welcome. And thanks for writing this application for us.
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.
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:
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
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
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
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:
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
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!
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!
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.
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.
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.
@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.
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.
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 ) 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
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 ) 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
thanks for the report Geoff
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)
or
the switchGeoffS wrote:Until I reboot that is.
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
Code: Select all
pnethood IP_ADDRESS
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
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
Rather than posting notes, wouldn't this work?
in /etc/opt/samba/lmhosts :
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