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

Tom

  • Full Member
  • ***
  • Posts: 196
  • Karma: +5/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #15 on: April 29, 2019, 07:17:08 pm »
Sean, don't you mean using 'netstat'  instead of 'nbtstat' ?

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #16 on: April 29, 2019, 08:40:41 pm »
Hi Tom,

Windows should provide the netbios over TCP/IP output needed to obtain the hostname, IP address and workgroup as follows:

C:\Users\SVC>nbtstat -n
Local Area Connection:
Node IpAddress: [199.50.132.203] Scope Id: []

                NetBIOS Local Name Table
       Name               Type         Status
    ---------------------------------------------
    SATELLITE      <00>  UNIQUE      Registered
    SATELLITE      <20>  UNIQUE      Registered
    UNIVERSE       <00>  GROUP       Registered
    UNIVERSE       <1E>  GROUP       Registered

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #17 on: May 01, 2019, 11:03:33 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. 

correct

Quote

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).


done (img 01)

Quote

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. 


done (img 02)

Quote
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. 

done (img 03)

Quote

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.


done (img 04) , since don't know how to change to k because I'm able to get back until C:\ by the cd .. command , then I just found this new resource in explorer, and I can browse the directories in it, assuming with this that everything is ok.

Quote


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.


ok, here comes the issue  (img 05):
[C:\]smbclient \\192.168.56.1\Users
gethostname failed
Unable to initialize messaging context
gethostname failed
smbclient: Can't load C:\MPTN\ETC/samba/smb.conf - run testparm to debug it .

If it can be of any help, img 06 shows what I actually have in C:\MPTN\ETC  (my OS2 volume directory)

Quote
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.

infact, the above seems something missing in the C:\MPTN\ETC and/or in Samba client 4.9.4-4, which I have installed by ANPM on the Arcanoae Subscription repository.

Thank you

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #18 on: May 02, 2019, 12:13:57 am »
From your OS/2 machine are you able to ping 192.168.56.1?

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #19 on: May 02, 2019, 07:01:21 am »
From your OS/2 machine are you able to ping 192.168.56.1?

yes, it returns an ininterrupted lines sequence of answer:
"64 bytes from  192.168.56.1 icmp_seq=… (sequence number)  time=0. ms  (once sometimes 10. ms)"

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #20 on: May 02, 2019, 06:37:46 pm »
Networking looks good and that last error you posted points to an issue with your Samba client installation - your smb.conf file couldn't be found, which is needed by the client utilities.   

Per the following readme client installation guidance (smbclut-1_3_0-1054), see if your client is appropriately configured:

Manual installation for older systems:
======================================
The following 3 files should be placed into \lib directory below the
directory you created in step 1. Their purpose is to help with character
translation in certain utilities. Run smbtree.exe -N in order to find out
whether these table files are actually found or not.
   lib\lowcase.dat
   lib\upcase.dat
   lib\valid.dat
Put the enclosed smb.conf in %ETC%\samba. It's purpose is more or less to make
the utilities happy when they check for its presence. It is however recommended
to set the workgroup properly.
======================================

Unrelated to this smbclient issue, I'm not sure what direction to go for the NetDrive error you received.  See if you missed something in Arca Noae's NetDrive installation, checking against their manual installation instructions (https://www.arcanoae.com/shop/netdrive-for-os2/).

« Last Edit: May 02, 2019, 06:42:59 pm by Sean Casey »

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #21 on: May 05, 2019, 08:13:25 pm »
thank you Sean, I have tried to manage with smbclut-1_3_0-1054 and its readme but the only thing I could take for sure was that smb.conf had to be placed in the exsisting C:\etc\samba directory. Doing only this did not change anything.
The other instructions on where to place the other files  are not clear to me.

"The following 3 files should be placed into \lib directory below the
directory you created in step 1." I did not create any directory, I need to know exactly if it's intended to be C:\usr\lib or what else.  Also, I do not catch exactly where to place the other files that are included in sys\apps\smbclnt of the zip archive.

If it tells anything, when I try to set the Netdrive smbfs resource configuration and it gives the system error, the detailed error message is the one in the image below. Could it mean anything wrong with the current system version of LBC066.DLL ?

« Last Edit: May 05, 2019, 08:15:16 pm by mauro »

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #22 on: May 08, 2019, 02:08:09 am »
Hi,

I was fortunate to have had the Samba client preinstalled for me on ArcaOS.  My smb.conf is located at \mptn\etc\samba\smb.conf.   I suspect the location can vary based on how your installation was configured, but it's safe to assume smb.conf should be located in your samba directory as it always is in the *nix world.

By running smbtree -N you will validate if your client and server are translating correctly, otherwise your network map might show strange output/characters.   My codepage files are located under the smbclnt subdirectory \sys\apps\smbclnt\codepage\.

I have installed NetDrive on a Warp 4 client without needing to install the samba client, so you might want to put the client install on hold and see if you can get your NetDrive working.
« Last Edit: May 08, 2019, 10:31:50 am by Sean Casey »

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #23 on: May 09, 2019, 08:33:43 pm »
ok, putting SAMBA folder (containing smb.conf) in C:/MPTN/ETC has produced something different as command line answer

[C:\]smbclient //192.168.56.1/User
gethostname failed
gethostname failed
Enter WORKGROUP\GUEST's password:

needless to say that I have no valid password to input there (never wanted a password for my home lan), and the result is:

session setup failed: NT_STATUS_ACCESS_DENIED

also, I've copied the 3 codepage files in C:/USR/LIB folder  ,  C:/USR/LIBEXEC folder ,  C:/LANGUAGE/CODEPAGE folder ,  being those directories the nearest ones I could find sharing the string "LIB" and "CODEPAGE" in their name.
As you see I'm trying hard before surrending


I feel this is a step forward but still no target in view

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #24 on: May 10, 2019, 02:01:22 am »
What do you see when typing the following at an OS/2 command prompt:  smbtree -N

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #25 on: May 10, 2019, 07:16:06 pm »
What do you see when typing the following at an OS/2 command prompt:  smbtree -N

[C:\]smbtree -N
gethostname failed
gethostname failed

[C:\]

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #26 on: May 15, 2019, 04:26:36 am »
Hi Mauro,

Your networking and authentication look fine.  Your issue appears to involve how smbclient was installed as it is not able to see your network.  I can't think of anything else other than going back over your installation of smbclient.

Your NetDrive installation doesn't have much in the way of software dependencies other than meeting minimum patch levels for your OS.  The NetDrive installation (and smb plugin) for my newly installed vanilla Warp 4 client didn't require any manual configuration for the software's installation, and the set up of those few configuration screens.  There are manual installation instructions you might want to review to help verify your installation.   I would focus first on getting your NetDrive working before moving back to getting the smbclient package installed.

It's not uncommon for me to spend hours and sometimes days to resolve my OS/2 related issues. Keep at it and I'm confident you will eventually get it working.   I'm happy to share any information on my smbclient and NetDrive installation configurations if you need a working reference point.

mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #27 on: May 18, 2019, 09:01:47 pm »
hi Sean, just to make it clear: while I attempt to connect, is that Windows volume resource supposed to remain mounted or not?
Consider that while OS2 guest system si running, Windows and its resources are running too

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #28 on: May 19, 2019, 07:05:26 am »
No, it's not to remain mounted.  That was to check to see if you could access your Windows share using your Windows machine's loopback adapter. 

I primarily use Linux and rarely boot Windows.  The latest version of Windows I have is v.7 and I understand you are using v.10.   Assuming you have your OS/2 software configured correctly, it's possible you might also run into security negotiation issues with Windows.   

The following settings are to make your Windows security less restrictive and are applicable to Windows v.7 but could very well apply to your Windows 10 host.  This will weaken your Windows security, but will allow older clients, such as OS/2, access.    I have tested this using a Warp 4 client and NetDrive connecting to a Windows 7 share.

=============

1) Type secpol.msc at the Windows command prompt

Browse to "Local Policies" - "Security Options".  Look for "Network Security: LAN Manager authentication level" and open it.  Click on the menu and select "Send LM & NTLM - use NTLMv2 session security if negotiated".  Apply the setting.

2) In the Advanced sharing settings page of Network and sharing center, you need to have it set as Work/Home profile.

-Enable network discovery
-Turn on file and print sharing
-Turn off password protected sharing
-Use user accounts and passwords to connect to other computers

3) Enter "gpedit.msc" at the Windows command prompt. Open "Computer Configuration"/Windows Settings/Security Settings/Local Policies/Security Settings.  In the right pane, enable the following policies:

-Enable network discovery
-Turn on  file and print sharing
-Turn off password protected sharing
-Use user accounts and passwords to connect to other computers




mauro

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +3/-0
    • View Profile
Re: Samba client on OS2 Warp 4.52
« Reply #29 on: May 19, 2019, 02:53:05 pm »
No, it's not to remain mounted.  That was to check to see if you could access your Windows share using your Windows machine's loopback adapter. 

I primarily use Linux and rarely boot Windows.  The latest version of Windows I have is v.7 and I understand you are using v.10.   Assuming you have your OS/2 software configured correctly, it's possible you might also run into security negotiation issues with Windows.   

The following settings are to make your Windows security less restrictive and are applicable to Windows v.7 but could very well apply to your Windows 10 host.  This will weaken your Windows security, but will allow older clients, such as OS/2, access.    I have tested this using a Warp 4 client and NetDrive connecting to a Windows 7 share.

=============

1) Type secpol.msc at the Windows command prompt

Browse to "Local Policies" - "Security Options".  Look for "Network Security: LAN Manager authentication level" and open it.  Click on the menu and select "Send LM & NTLM - use NTLMv2 session security if negotiated".  Apply the setting.

2) In the Advanced sharing settings page of Network and sharing center, you need to have it set as Work/Home profile.

-Enable network discovery
-Turn on file and print sharing
-Turn off password protected sharing
-Use user accounts and passwords to connect to other computers

3) Enter "gpedit.msc" at the Windows command prompt. Open "Computer Configuration"/Windows Settings/Security Settings/Local Policies/Security Settings.  In the right pane, enable the following policies:

-Enable network discovery
-Turn on  file and print sharing
-Turn off password protected sharing
-Use user accounts and passwords to connect to other computers

Hi Sean, something good has finally happened after having applied your last suggestions : Samba seems alive ! Here is the command responses in the OS2 command window (at password request I've just hitted [send]:

[C:\]smbclient \\192.168.56.1\Users
gethostname failed
gethostname failed
Enter WORKGROUP\GUEST's password:

Try "help" to get a list of possible commands.
smb: \> dir
  .                                  DR        0  Sat Jul  7 13:06:16 2018
  ..                                 DR        0  Sat Jul  7 13:06:16 2018
  Default                           DHR        0  Wed Sep 26 20:29:58 2018
  Default.migrated                    D        0  Sun Sep  4 19:20:29 2016
  desktop.ini                       AHS      174  Sat Jun 16 17:26:53 2018
  Public                             DR        0  Wed Sep 26 20:28:39 2018
  user                                D        0  Sun Jul 31 08:38:03 2016

                239907945 blocks of size 4096. 178492899 blocks available
smb: \>

now, this is working in the OS2 command window but still cannot get it work in the Net Drive panel -Mount resource configuration (smbfs plugin) where I keep having an error alert when at the end I hit DONE, sure 100% that I'm doing mistakes in filling the fields values.
Another small step to the goal   :D