Author Topic: Samba client on OS2 Warp 4.52  (Read 19162 times)

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Samba client on OS2 Warp 4.52
« on: April 23, 2019, 10:19:42 am »
Hi all, I've seen that a few packages have been introducted on Arcanoae subscription repository, and Samba Client Utility among them.
I do not have a strong knowledge on what it could be useful for, I just presume that it could be good to implement the browsing of the volumes belonging to my  host pc HD (being OS2 running on VirtualBox), or else other pc connected in my domestic lan.
Could someone help me in understanding more?
Thank you

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Samba client on OS2 Warp 4.52
« Reply #1 on: April 23, 2019, 02:39:48 pm »
Hi Mauro.

I use the Samba client to copy files from:
-  a Windows 10 machine on my network to the ArcaOS Box (and viceversa)
- a Windows 10 machine on my network to my ArcaOS VM  (and viceversa) (Even if Windows 10 is the host).
- a Network hard drive.

I'm not a Samba power user, I don't know how to use the commands, I just mount the drive with Arca Mapper.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #2 on: April 23, 2019, 11:59:29 pm »
Hi mauro,

Martin provided a pretty good explanation.

I have been using NetDrive for some years now. You can access various types of storage through plug-ins, in the case of Samba the NetDrive has a Samba plug-in, which in turn requires that a Samba client is present on your local machine.

In my case that allows various disks mounted across my various computers on the LAN to be visible on my local OS/2 machine, as if they were local drives. In particular though I am heavily using this functionality to access our NAS, which is really where I am pushing everyone in my household to start storing their documents.

Of course you do not neet NetDrive to use Samba client, you can do it from CLI as well, just a little more troublesome, that's all.

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #3 on: April 24, 2019, 08:20:47 am »
Ok, thank you Martin and Dariusz, I understood would be easier having NetDrive to handle with Samba Client installed.
I just saw that is a shareware, it costs 29$ to to use it,  but also read this point (below) in terms & conditions which would state a free utilization if limited to Samba plugin only, that would apply to my case, am I right?

Using NetDrive for OS/2 exclusively with the Samba plugin removes the
restrictions imposed by the Shareware License but does not convert
NetDrive for OS/2 to the registered version. Specifically, using NetDrive
for OS/2 exclusively with the Samba plugin under this Exclusive Samba Use
License does not entitle the user to the Developer support provided for
the registered version of NetDrive for OS/2 under the Shareware License.
« Last Edit: April 24, 2019, 08:46:05 am by mauro »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #4 on: April 24, 2019, 05:25:58 pm »
Hi mauro,

...I just saw that is a shareware, it costs 29$ to to use it,  but also read this point (below) in terms & conditions which would state a free utilization if limited to Samba plugin only, that would apply to my case, am I right?...

I was not aware of this, but that's a pretty awesome way to let folks try things out. I have used it for other access such as mapping into a ISO file, to FTP or NFS shares. So given that I was going to use it across numerous applications I just went ahead and purchased the license. For the sort of functionality it delivers I thought it was a very reasonable cost.

Try it out first and go from there!

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #5 on: April 25, 2019, 07:48:42 pm »
ok installed Samba client and NetDrive, started NetDrive I have a blank panel…..can you lead me on the right way to get a shared resource (i.e my other volume on the system), or maybe I have to separately add the proper plugin?
Thanks

« Last Edit: April 25, 2019, 07:50:14 pm by mauro »

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #6 on: April 26, 2019, 03:55:02 am »
Hi,

You will also need to install the smb NetDrive plugin.   You can find it here: http://trac.netlabs.org/samba

Once installed, use the NetDrive Volume menu and select "Attach New Volume" menu option.  You will then elect a drive letter to assign your mount point.

With your mount point highlighted within NetDrive, select the Resource menu and the "Mount Resource" menu option. You will be presented with a screen where you should see the option of "smbfs" which is your samba plugin you installed.   

Clicking the "Properties" button will present a screen where you identify your smb workgroup, server, share name, and login credentials.  Once you complete these entries and click the Done button, you will then have your mount point defined and it should be mounted and ready for use.

To save these settings for future use, select the NetDrive menu and the Volume Configuration Save option. 

If you ever lose your mount point due to network issues, you can restart NetDrive by selecting the NetDrive menu, and Control Program Start option.


mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #7 on: April 26, 2019, 03:30:19 pm »
thank you Sean, the netlabs url linking to the Samba Netdrive plugin (both 3.3.16  and  3.5.21 beta4) point to 404 message pages, but now found this file by Paul Smedley at

https://ecsoft2.org/client-samba-plugin-netdrive-o-evfsgui

so I got the zip file
http://smedley.id.au/downloads/ndpsmb-3.6-samba410-20190324.zip

containing only ndpsmb.dll and ndpsmb.map, no readme for installation instruction. 

the quick manual inst reference on the EcSoft/2 page says "unzip the downloaded plugin archive to an empty directory and run instpl.cmd" but there is no such file in the zip archive
Am I supposed to just place those two files in the OS2/DLL directory ?
« Last Edit: April 26, 2019, 04:05:17 pm by mauro »

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #8 on: April 26, 2019, 03:54:30 pm »
thank you Sean, the netlabs url linking to the Samba Netdrive plugin (both 3.3.16  and  3.5.21 beta4) point to 404 message pages
This link from http://trac.netlabs.org/samba works for me:
ftp://ftp.netlabs.org/pub/samba/client/ndpsmb-2_1_5-GA-20131003.wpi

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #9 on: April 26, 2019, 04:02:35 pm »

This link from http://trac.netlabs.org/samba works for me:
ftp://ftp.netlabs.org/pub/samba/client/ndpsmb-2_1_5-GA-20131003.wpi

I believe there is a wrong URL prefix address handling on my browser, since it anyway begins in the address field as "http://ftp://ftp..............."

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #10 on: April 26, 2019, 04:14:47 pm »
I believe there is a wrong URL prefix address handling on my browser, since it anyway begins in the address field as "http://ftp://ftp..............."
You're right. I remember that some links here in this forum don't work. Likely ftp:// links are affected. Try the links on the trac web page. That's the one I've just tried. Or transfer it via copy and paste to the address bar of your browser.

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #11 on: April 27, 2019, 07:14:50 pm »
Hi,

You will also need to install the smb NetDrive plugin.   You can find it here: http://trac.netlabs.org/samba

Once installed, use the NetDrive Volume menu and select "Attach New Volume" menu option.  You will then elect a drive letter to assign your mount point.

With your mount point highlighted within NetDrive, select the Resource menu and the "Mount Resource" menu option. You will be presented with a screen where you should see the option of "smbfs" which is your samba plugin you installed.   

Clicking the "Properties" button will present a screen where you identify your smb workgroup, server, share name, and login credentials.  Once you complete these entries and click the Done button, you will then have your mount point defined and it should be mounted and ready for use.

To save these settings for future use, select the NetDrive menu and the Volume Configuration Save option. 

If you ever lose your mount point due to network issues, you can restart NetDrive by selecting the NetDrive menu, and Control Program Start option.

Sean, sorry for getting back to you, I have installed the samba plugin and proceeded as per your instruction.
Once selected a drive letter to mount (K) , then I go in Resource menu, select the Mount Resource item, choose smbfs and click on Properties (img smbfs1.jpg).

Here (img smbfs2.JPG) is not so clear what/where to set as parameter, and I've also read the HELP section. My main need is to discover/browse my HD volumes other than C:\ which is the root OS2 system in VirtualBox, and secondly (possibly) my home lan connected volumes.

Whatever I try to write -without knowing what it might mean- , I obtain the system error warnings (img smbfs3.JPG and img smbfs4.JPG).

Of course I would need to be more aware or at least more intuitive

« Last Edit: April 27, 2019, 07:17:34 pm by mauro »

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #12 on: April 28, 2019, 06:10:30 pm »
Hi Mauro,

It would be helpful to confirm the shares you made available on your network.   At an OS/2 command line, type the following, replacing "xxx" with the IP or host name (if defined in your \mptn\etc\hosts file) of the host having the shares:

            smbclient -L xxx.xxx.xxx.xxx

If your are unable to enumarate your shares with the above command, you will need to verify your host machine has available shares. 

If the above returns a list of available shares, connect to one of the shares using the following OS/2 command, replacing "zzz" with your share name.  If you have user security established on your share, you will be prompted for a password.  If you need to identify a different user when connecting, add "-U username" to the following command to identify the user.

           smbclient \\xxx.xxx.xxx.xxx\zzz

If you successfully connect to the share, you will be at an smb command prompt "smb: \>".  You can then issue a "dir" command to list the files in your share.

« Last Edit: April 28, 2019, 06:35:35 pm by Sean Casey »

mauro

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #13 on: April 28, 2019, 07:33:56 pm »
Hi Mauro,

It would be helpful to confirm the shares you made available on your network.   At an OS/2 command line, type the following, replacing "xxx" with the IP or host name (if defined in your \mptn\etc\hosts file) of the host having the shares:

            smbclient -L xxx.xxx.xxx.xxx
Hi Sean, I hoped it could be easier sharing local resources with NetDrive and Samba:

[C:\]smbclient -L 127.0.0.1
*here I do not know what else could I write instead 127.0.0.1 and how to discover it, I have just read this address in
C:\MPTN\ETC\hosts.  In other words I ignore the IP address of my resources

the terminal answer is:
gethostname failed
Unable to initialize messaging context
gethostname failed
smbclient: Can't load C:\MPTN\ETC/samba/smb.conf - run testparm to debug it

Quote
If your are unable to enumarate your shares with the above command, you will need to verify your host machine has available shares. 

in my Windows10 resources I have the C volume and the network shared resources accessible just by opening the explorer window, don't know how to translate it in a local resource address to indicate to Samba, which I thought is there to do this.
In the other OS that I'm working with, like Linux Ubuntu or Project Trident (Unix) , you have a resource browser utility that just discover the resource and make them available to you, I believed NetDrive + Samba in OS2 worked with the same premises.

Quote

If the above returns a list of available shares, connect to one of the shares using the following OS/2 command, replacing "zzz" with your share name.  If you have user security established on your share, you will be prompted for a password.  If you need to identify a different user when connecting, add "-U username" to the following command to identify the user.

           smbclient \\xxx.xxx.xxx.xxx\zzz

If you successfully connect to the share, you will be at an smb command prompt "smb: \>".  You can then issue a "dir" command to list the files in your share.

I then need to clear out on how to solve the above explained difficulty, otherwise I won't go far.
Thank you anyway

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #14 on: April 29, 2019, 03:32:49 am »
I am assuming you are using Windows as your host machine and you are running OS/2 as a virtualized guest and would like your OS/2 guest to access your Windows file system using a Windows share. 

Use the smbclient -L command with your Windows IP address.  The 127.0.0.1 address you had used is your OS/2 "local" address, also called your loopback address.  To find your Windows IP address and your Windows workgroup, get to a command line on your Windows machine and type "nbtstat -n".  This is the address you should use when typing smbclient -L xxx.xxx.xxx.xxx at an OS/2 command prompt.  You will also see your workgroup name (identified as TYPE GROUP).

Before you try to access your Windows share from OS/2, you can test accessing your Windows share from within Windows itself.  Get to a Windows command line and type "net share" to identify the share you have created.  You will see hidden system shares with a dollar sign "$", but you should see the share you created without the dollar sign. 

Once you confirm you have created a Windows share and can see it with the Windows "net share" command, from the Windows command line,  create a mount point to your share to see that you can access the share from Windows.   You would do this by typing the following at a Windows command prompt:

"net use z: \\xxx.xxx.xxx.xxx\sharename persistent:yes"       

Replace "z:" with any unused drive letter you want to use as a mount point.  Replace "xxx.xxx.xxx.xxx" with your Windows machine's IP address obtained from the "nbtstat -n" command.   Replace "sharename" with the name of the share you created and confirmed existed with the "net share" command. 

If your share exists and you have permission to access the share, you should be able to change to the mount point (z:) and issue a "dir" command to see the contents of your share.

If this all works, then go back to OS/2 and use the command smbclient \\xxx.xxx.xxx.xxx\sharename using your Windows host IP address and Windows sharename.  You hopefully will connect to the share and have an smb command prompt "smb: \>".  You can then issue a "dir" command to list the files in your share as you had  done on your Windows machine.

While doing the above might seem like a PITA, it's helpful to diagnose where you might be having a problem.  If the above works, then you should be able to get NetDrive configured and working with the above IP address, workgroup and sharename.
« Last Edit: April 29, 2019, 06:30:42 pm by Sean Casey »