Author Topic: Universal Naming Convention (UNC) on Samba?  (Read 6261 times)

Doug Clark

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +7/-1
    • View Profile
Universal Naming Convention (UNC) on Samba?
« on: June 19, 2021, 05:51:01 am »
Does universal naming convention (UNC) work on Samba for OS/2?  Or is it limited to Netbios (file/print services) on OS/2?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #1 on: June 20, 2021, 12:24:09 am »
Hey Doug!

Do you mean as in "dir \\nas"?

..where 'nas' is my local nas box?

In that case, from CLI it does NOT work.

Now consider that I have all my Samba shares mapped through NetDrive, as such, I can readily get to them through the typical drive mapping.

When it comes to Samba specific client though, here is what a 'smbtree' returns on my system:

Code: [Select]
[G:\]smbtree
Enter HOME\dariusz's password:
HOME
        \\WINMAIN                       WINMAIN
                \\WINMAIN\C$                    Default share
                \\WINMAIN\ADMIN$                Remote Admin
                \\WINMAIN\Printer2              Microsoft XPS Document Writer
                \\WINMAIN\C
                \\WINMAIN\SamsungPhotoPrinter   Samsung SPP-2040 Series
                \\WINMAIN\print$                Printer Drivers
                \\WINMAIN\IPC$                  Remote IPC
        \\ORCLSRVR
        \\NAS                           NSA325
                \\NAS\IPC$              IPC Service ("NSA325")
                \\NAS\public
                \\NAS\video
                \\NAS\photo
                \\NAS\music
                \\NAS\admin
                \\NAS\nfs
                \\NAS\BACKUP
                \\NAS\VOL1

But if the Samba client approach is A-OK for you, than I would say the UNC naming convention would work.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #2 on: June 20, 2021, 12:35:55 am »
I think you have to use an URL such as,
Code: [Select]
smb://NAS/publicAnd NAS has to be resolvable, through DNS (host file) or the WINS thingy.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #3 on: June 20, 2021, 12:46:20 am »
I think you have to use an URL such as,
Code: [Select]
smb://NAS/publicAnd NAS has to be resolvable, through DNS (host file) or the WINS thingy.

So 'dir smb://nas/public' Dave???

Nah, no go...NAS is resolvable, I have an entry in HOSTS as well as lmhosts, here is what I get:

Code: [Select]
[G:\]dir smb:\\nas\public

The volume label in drive G is OS2.
The Volume Serial Number is 45B6:75C3.

SYS0123: A file name or volume label contains an incorrect character.

...and the forward-slash version of it just produces multiple SYS1003 errors ( The syntax of the command is incorrect.).

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #4 on: June 20, 2021, 02:29:47 am »
Yea, dir or any other DOS commands won't understand it. Perhaps some *nix ones might. Could try ls.

Doug Clark

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +7/-1
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #5 on: June 21, 2021, 02:53:42 am »
Looks like Dave's answer is, unfortunately correct.

For Darius:

UNC =  \\machineName\shareName

machineName originally was a netbios name.  ShareName was a shared resource on machineName, i..e a drive or a directory.

Microsoft "enhanced"  UNC later for networked windows machines to allow IP addressing for the machineName, and now other
addressing

I don't know where IBM file/print client resolves netbios names but
it looks like Samba on OS/2 (more specifically ArcaMap) uses the LMHosts file in
C:\MPTN\ETC\samba

for resolving netbios machine names to IP addresses

Mine looks like
-------------------------------------------------------------
dir \\req1\# Created by ARCAMAP Version 2.6.20180125 on 20 Jun 2021 at 17:18:03
# Syntax:
# IP-address             NetBIOS-name     [Role]
192.168.32.125           REQSRV1         
192.168.32.243           SERVERS1         
------------------------------------------------------------

It appears that when the redirector mechanism for remote file system requests was created for Samba on OS/2 it did not include UNC resolution, only drive letter resolution.

I am not complaining.  I was just wondering if there was some service I needed to start or some configuration I needed to do in Samba to make UNC work in Samba - and the answer apparently is no.



Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Universal Naming Convention (UNC) on Samba?
« Reply #6 on: June 21, 2021, 02:11:38 pm »
Hi Doug,

Looks like Dave's answer is, unfortunately correct.

For Darius:

UNC =  \\machineName\shareName

machineName originally was a netbios name.  ShareName was a shared resource on machineName, i..e a drive or a directory.
..

Right, I got that. My NAS maps to 192.168.1.4 and is present in LMHOSTS file as well. My expectation was that the Samba client would automatically show all shares that are present, sort of similar to what smbtree shows, albeit with actual contents listed. That may have been too wide of a sweep though! lol

It would appear that as of right now the UNC resolution, when attempting to access Samba shares, does not work on our platform. ('ls' did not work either)