lameSMBxplorer v0.2.2 beta

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

lameSMBxplorer v0.2.2 beta

#1 Post by Patriot »

Hmmm .....


lameSMBxplorer is a samba/windows shares mount utility written from scratch. So far, it has been tested against samba-3.0.37, samba-3.3.10, Win98, WinXP simple/protected shares and was also briefly tested against Win2003 server ...

As of today, the lameSMBxplorer utility (v0.1.8b/v0.2.0b) is still in beta but is surely approaching towards a stable status. All this was achieved with the help given and the feedbacks received from many of our helpful and knowledgeable forum members (you know who you are). I am grateful to you all ...

Beginning with v0.2.0 beta, a new add-on utility is introduced: lameSMBqmount for handling shares quickmounting and automounting. Development of the quickmounting prototype slowly began less than three weeks ago and it has been rewritten twice during this period. I'm pleased to be able to release the quickmounting add-on much earlier than expected ... I hope that this supporting add-on will be able to fulfill the gap for quick-n-easy samba mounting ...

The new add-on utility (lameSMBqmount) will now become the main development focus, while lameSMBxplorer will go through a few minor feature completion process (and also yet to be done, the hardest part, some sort of a proper documentation/manual) ... The next step that's being planned is to design and implement a simple and easy to use samba shares setup interface. Well, let's see how it goes ...


lameSMBxplorer usage notes:
1. Ensure that your network interface is appropriately configured.
2. Only reachable local subnets will be scanned.
3. The default mount username is guest with no password.
4. Global domain/username/password options will be used for scanning/mounting (if specified).
5. Global options will be auto saved.
6. Important: username/password is stored in plain text, if saved.
7. Single click to select server/machine.
8. Double click to select share mount.
9. Right button double click on shares to mount-n-explore.


Image Image Image


lameSMBqmount usage notes:
1. No network scanning is performed (or even checked).
2. Field column descriptions from left to right:
. automount status icon, IP/Server/Share details and current mount status.
3. Single-click to select a share to edit/delete/mount/unmount/explore.
4. Double-clicks on a share for a fast mount-n-explore in rox. Yes, individual credentials for each share will be used, if any.
5. Share entries can be added either a) manually or b) from lameSMBxplorer.
6. To manually add an entry, the compulsory fields are IP address, Server name and Share name.
7. If a new entry is added to the list from lameSMBxplorer, it defaults to automount disabled.
8. All shares will be mounted to /mnt/nework/ base directory. If you need a custom path,
I suggest making a symlink from /mnt/network/* to your preferred location after mounting the share(s).
9. Important: Be aware that username/password is stored in plaintext.
10. To enable a share for automounting during startup, enable the "Automount on startup"
option in the edit dialog. Once enabled, it will be automounted on every startup.


Image Image


How does automounting work?
1. Automounting (and auto-unmounting) is done by the /etc/init.d/rc.smbqmsvc script. The parameter file /etc/.lameSMQlist holds the list of all shares for automounting/quickmounting.
2. During bootups, the smbqmsvc script will wait for up to 120 seconds for an active network setup. If an active network is detected, it will attempt to mount any entry from the parameter file that is marked for automounting. A success/failure status will be reported in the error log (ie. /tmp/bootsysinit.log).
3. An option to delay the automounting by 30secs (reduced from 60secs) is provided in lameSMBqmount for cases where the network interface (ex: wifi) may need more time to settle.
4. Unmounting of shares is done differently. The rc.smbqmsvc script will find and unmount any CIFS mounts. That's right, any mounted cifs shares will be automatically unmounted on shutdowns.
5. Due to an oversight in the rc.shutdown script, auto unmounting of shares during shutdowns may result in a delay of up-to several minutes depending on the number of active shares to unmount. The reason is that the network interface(s) shutdowns before the unmounting process begins. There are two suggested remedies for this:
a) Enable the "Early unmount" checkbox option in lameSMBqmount. This option if enabled, will patch rc.shutdown to unmount all CIFS mounted shares much much earlier during shutdowns. Turning it off will remove the patch if it was applied previously. Please note that this option takes effect immediately.
b) Manually edit rc.shutdown and move the init.d script invocation before rc.network stop is called (or move rc.network stop after init.d invocation). If this is done, the "Early unmount" checkbox option in 5a) will be disabled.



Rgds

._.
Attachments
lameSMBxplorer-0.2.2b.pet
Bug fix: exclude localhost route and corrected netmask parser logic
(20.09 KiB) Downloaded 2966 times
lameSMBxplorer-0.2.1b.pet
Bug fix : exclude lo device route for automounting
(20.04 KiB) Downloaded 1926 times
lameSMBxplorer-0.1.8b.pet
Bug fixes for two (2) recently reported issues.
(15 KiB) Downloaded 1609 times
Last edited by Patriot on Fri 06 Aug 2010, 10:13, edited 14 times in total.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#2 Post by Patriot »

here be dragons

eden6000
Posts: 259
Joined: Sun 08 Apr 2007, 06:49

#3 Post by eden6000 »

Hi Patriot, nice app...I tried it at work, we have windows server 2003, your program sees the servers, but it fails connecting to all of them... pnethood does the same, its log says "cli_nt_create failed on pipe \srvsvc to machine name_of_machine. Error was NT_STATUS_ACCESS_DENIED". I suppose it has something to do with windows server proprietary protection system...btw old linneighbourhood succeeded in connecting to the servers.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#4 Post by Patriot »

Hmmm .....
eden6000 wrote:Hi Patriot, nice app...I tried it at work, we have windows server 2003, your program sees the servers, but it fails .....
Thanks for the feedback eden6000, much appreciated ...

I believe that we need to supply more options to properly connect to win2003 ... Adding advanced option entries can be done quite easily but the actual connection usage needs a bit of understanding ... If possible, could you let me know which are the options you used with linneighborhood (workgroup, uid, gid, fmask, dmask, username, password, port etc) ? ... In the meantime, I'll see if I can find a win server somewhere as it would be a whole lot easier to make further tests with one ....


Rgds

eden6000
Posts: 259
Joined: Sun 08 Apr 2007, 06:49

#5 Post by eden6000 »

Ok, I rebooted into Pizzapup, which uses Linneighborhood, so I try to answer your question...in the preferences window there is no particular setting, apart from the username and the password you use to log into the servers; so I started logging on, and I can tell you what it does:
when scanning the network it says:
GetSMBGroups:nmblookup -M domain_name -S -d1
GetSMBGroups:smbclient -L username -W domain_name -Uusername%password -d1

Then, when scanning a single server:
GetSMBShare:smbclient -L server_name -Uusername%password -W domain_name -d3

Finally, when mounting a share:
smbmount//server_name/path /mount_directory -o username=user_name%password,fmask=644,dmask=755,uid=0,gid=0,debug=0,workgroup=domain_name

Hope that helps.....

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

#6 Post by HairyWill »

Very nice.
I'm glad you are developing a better alternative to pnethood I was feeling guilty for not maintaining it. I will give you all the testing and debugging help I can. I don't have a Win2003 box unfortunately.

I am sure that you have a good plan for further development but a few things that you might consider are:

1. The shares reported by some servers depend on the user credentials supplied by smbclient.

2. If your design will allow the removal of nmblookup and obviously smbmount is no longer needed. You might consider a design that will work without smbclient as well. If this is not present and the user clicks on a server you could give them the option to enter a share name. This would definitely impact usability but removing these would save over 1Mb of compressed space in the iso. (I am not sure if some of these are needed for printing)

3. If I enter bad credentials the mountpoint is not always deleted. This has caused problems in the past when someone has written loads to what they thought was a share but was really inside their pup_save. ( I do appreciate that your mount dialog will not let them view an unused mountpoint)

4. I can't mount two shares at the same time. The problem is a typo in the ShareName variable.
mountchk=$($imount | grep -c "/mnt/network/$nbtName/$shrName")
Also this will not work properly if I have two shares named PublicRO and PublicRW

5. My gtkdialog understanding is not the best but I think that you are running smbclient on all the servers before displaying the main window , pnethood does this as well but I do not think it is a good idea. Some servers can be very slow to respond. It might be better just to do it when they try to open an individual server or run it in the background.

6. It would good to be able to see the mount status of shares alongside their names.

7. The "done" scanning window is hidden behind the main one

8. I was working on an inheritable options system for pnethood that would allow you to set options at global, server and share level.

Keep up the good work.
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
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#7 Post by zigbert »

HairyWill
:D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#8 Post by zigbert »

Can I replace pnethood with lameSMBxplorer for Puppy Stardust ?

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#9 Post by ttuuxxx »

zigbert wrote:Can I replace pnethood with lameSMBxplorer for Puppy Stardust ?
lameSMBxplorer looks like it has a lot of potential :) but its in early years and wouldn't surpass pnethood yet, from the readings and images, it looks like it doesn't support username or passwords either, where as Pnethood does, That would be a large security hole. Open shares on windows is ok if you don't have the internet or wireless, lol Well a good configured firewall would help :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#10 Post by ttuuxxx »

HairyWill wrote: Keep up the good work.
Nice to see you around HairyWill, hope life is good :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#11 Post by Patriot »

Hmmm .....
eden6000 wrote:........
smbmount//server_name/path /mount_directory -o username=user_name%password,fmask=644,dmask=755,uid=0,gid=0,debug=0,workgroup=domain_name

Hope that helps.....
Thanks eden6000, it sure did helped me understand a bit better ... I've added the domain entry and the additional file modes (for now, hardcoded for mounting). If you could avail yourself to give this another test run, I'd be interested to know if the domain entry helped with the connection ... If it doesn't, then I'll definitely will have to find a win server somewhere ...


Rgds

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#12 Post by Patriot »

Hmmm ...

HairyWill,

Your help and support is always welcomed ...

My comments to each point that you highlighted earlier :

A1. Yes, I'm quite aware of that. I'm looking into it, reading some more and wanting to understand in which cases this happens. Now, temporarily implemented as global user/passwd.

A2. I'm in favour of having smbclient preserved for two reasons, i) cli fallback/diagnostics when all else fails ii) I would like to see dynamic shares listing. I've given it a bit more thought and I'll try to find a way to get the browse list by some other means, if possible ...

A3. Yes, I experienced it myself once before :) ...

A4. Good catch! It is a typo, bummer ... It's now fixed and improved so that PublicRO and PublicROX will also be grep'ed correctly. Thanks Will ...

A5. Yes, you're correct, there're two scan levels, i) find servername(s) ii) find sharename(s) ... servernames are returned quite promptly but returning shares/resources as I understand it, is usually done by Local Master Browser (LMB) or backup Browser (bB) nodes ... in this case, we make the request directly to the required server and this may result in the request being pushed around to LMB/bB nodes (if any), thus the delay ... I would have liked to use smbtree queries (seems more reliable) but since that's not in the standard iso, I'll make do with smbclient.

I understand what you meant by smbclient queries delay. It bugs me too but we have to make a bit of trade-offs and so, I would prefer a single slow scan rather than having to scan each server with each click ...

I did a bit of reading on DMB, LMB and bB before this to try and understand what happens behind the scene. It seems that there's no easy way of getting instant browse list without some sort of caching ... I'm experimenting a bit to see if its possible to cache the browse list (ie. something similar to windows behaviour) for quick retrieval but right now it doesn't seem to be resource friendly if users does not require such functionality.

Please correct me if any of my understanding above is flawed ... I'm no smb expert ...

A6. Agreed, but it would make gtkdialog status updates a bit more complex than it already is ... I'll KIV it for now ...

A7. Was unable to duplicate (with puppy412). Kindly elaborate briefly (ie. was there many shares to scan?) and I'll run more tests and hope to sort it out a.s.a.p.

A8. Haven't thought this far yet but I'm open to any suggestions ...

Thanks HairyWill for your feedback and input, they're much much appreciated ...


Rgds

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#13 Post by Patriot »

Hmmm .....

zigbert wrote:Can I replace pnethood with lameSMBxplorer for Puppy Stardust ?
Sure you can ... on one condition, you must try it out and feel good about it ... :)

Maybe you may want to let it grow up a bit for a week or two (at least) so that we can iron out most connection issues, though I'm pretty sure I get it right with Samba/W98/WXP connections by now ...

I'm also looking for suitable icons ... any recommendations zigbert?
ttuuxxx wrote: ..... it looks like it doesn't support username or passwords either .....
Actually, it does ttuuxxx. Their entries can be made right before making a shared connection ...


Rgds

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#14 Post by ttuuxxx »

Patriot wrote:
ttuuxxx wrote: ..... it looks like it doesn't support username or passwords either .....
Actually, it does ttuuxxx. Their entries can be made right before making a shared connection ...


Rgds
well then its at a much better level that I figured :)
does it remember the user name and passwords?
If so maybe some sort of stored password encryption might be better.
Also maybe a puppy shares might be nice :) 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

eden6000
Posts: 259
Joined: Sun 08 Apr 2007, 06:49

#15 Post by eden6000 »

Patriot, I've tried your new pet, I've inserted username and password (although I suggest you do something to make it remember them), but nothing happens the same :( . So I started it from terminal, and after regularly scanning the network, when I click on a server the only thing it does is "LookUpShares:192.168.x.x"

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#16 Post by ttuuxxx »

[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 :)

eden6000
Posts: 259
Joined: Sun 08 Apr 2007, 06:49

#17 Post by eden6000 »

newbie, ok....not that much......
:)

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#18 Post by Patriot »

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 :) 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+ ... ;)
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

eden6000
Posts: 259
Joined: Sun 08 Apr 2007, 06:49

#19 Post by eden6000 »

please be patient as this may take a little while
sure Patriot, thanks for your work instead :)

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

#20 Post by HairyWill »

a few problems here

Code: Select all

	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: [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]

Post Reply