[Samba] Mac OS and interpretation of @ in a username. Ex user at mds.xyz doesn't work on Mac OS but does on Win 10

TomK tomkcpr at mdevsys.com
Mon Feb 24 05:47:42 UTC 2020


On 2/23/2020 2:54 PM, TomK via samba wrote:
> On 2/23/2020 11:44 AM, Rowland penny via samba wrote:
>> On 23/02/2020 16:05, TomK wrote:
>>> On 2/21/2020 9:18 PM, Andrew Bartlett via samba wrote:
>>>> On Fri, 2020-02-21 at 20:48 -0500, TomK wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> "Sadly this really appears to be is a client issue.  You see there 
>>>>>> the
>>>>>> string Samba gets, so by the time Samba tries the process it the @ is
>>>>>> already interpreted and the string split.
>>>>>>
>>>>>> Sorry!
>>>>>>
>>>>>> Andrew Bartlett"
>>>>>>
>>>>>> Yeah, wondering if there is a way to tell Samba NOT to split that 
>>>>>> up and
>>>>>> treat joe at mds.xyz as a single user.  This works fine in Win 10 so I
>>>>>> agree, it's probably a client SMB configuration issue but would 
>>>>>> like to
>>>>>> know exactly what that config issue is.
>>>>>>
>>>>>
>>>>>    + or what paramaters I could change to ensure the string isn't 
>>>>> split up.
>>>>
>>>> You can't change it on the Samba side, you could try logging in as
>>>> SERVER\joe at mds.xyz or see if you can re-map it server-side with the
>>>> various username map options.
>>>>
>>>> You need to realise that the protocol has a domain field and a username
>>>> one.  Well behaved clients know that user at realm style usernames need to
>>>
>>>> all be in the username field, not split up client-side (and left to the
>>>> DC to interpret), but even Samba got this wrong for quite some time.
>>>>
>>>> I hope this helps,
>>>>
>>>> Andrew Bartlett
>>>>
>>>
>>>
>>> I'm seeing what you mean.  I'll have to read into the server-side 
>>> re-map options.  No idea where to find them (yet).
>> Try searching for 'username map'
>>>
>>> Looking at the attached logs however, appears the server is already 
>>> getting the split user.  Or am I reading that incorrectly?
>> It looks Windows is sending 'joe at mds.xyz', but your Macbook isn't, it 
>> could be sending just 'joe' or 'NFS03\joe' or something else entirely.
>>
>> Rowland
>>
>>
>>
>>
>>
> 
> Yep.  It's very persistent at parsing it by / or @ or \ .  Even if I try 
> "joe at mds.xyz"  I get user '"joe' printed which includes the quote.
> 
> 

I've tried a few command line options as well.  No luck.  Even here it 
parses based on the above chars ( \, @, / ):

     5  mkdir samba
     6  mount -t smbfs //joe at mds.xyz@192.168.0.125/NFS-joe samba
     7  mount -t smbfs //mds.xyz\joe at 192.168.0.125/NFS-joe samba
     8  mount -t smbfs //joe\@mds.xyz at 192.168.0.125/NFS-joe samba
     9  mount -t smbfs //"joe\@mds.xyz"@192.168.0.125/NFS-joe samba
    10  mount -t smbfs //192.168.0.125/NFS-joe samba
    11  mount -t smbfs //192.168.0.125/NFS-joe samba -U "joe at mds.xyz"
    12  mount -t smbfs //192.168.0.125/NFS-joe samba -u "joe at mds.xyz"
    13  mount -t smbfs //192.168.0.125/NFS-joe samba -o user="joe at mds.xyz"
    14  mount -t smbfs //192.168.0.125/NFS-joe samba -o user=joe at mds.xyz
    15  mount -t smbfs //192.168.0.125/NFS-joe samba -o rw,user=joe
    16  mount -t cifs //192.168.0.125/NFS-joe samba -o rw,user=joe
    17  mount -t smbfs //192.168.0.125/NFS-joe samba
    18  id joe at mds.xyz
    19  mount -t cifs //192.168.0.125/NFS-joe samba -o 
username="joe at mds.xyz"
    20  mount -t cifs //192.168.0.125/NFS-joe samba -o username=joe at mds.xyz
    21  mount -t smbfs  //192.168.0.125/NFS-joe samba -o 
username=joe at mds.xyz
    22  mount -t smbfs  //192.168.0.125/NFS-joe samba -o 
username="joe at mds.xyz",password="<JOESPASS>"
    23  mount -t smbfs  //192.168.0.125/NFS-joe -o 
username=joe,password="<JOESPASS>",domain=mds.xyz
    24  mount -t smbfs  //192.168.0.125/NFS-joe -o 
user=joe,password="<JOESPASS>",domain=mds.xyz
    25  smbclient -U joe at mds.xyz //192.168.0.125 -L //NFS-joe
    26  mount -t -o username=joe at mds.xyz //192.168.0.125/NFS-joe samba
    27  mount -t smbfs -o username=joe at mds.xyz //192.168.0.125/NFS-joe samba
    28  mount -t smbfs -o user=joe at mds.xyz //192.168.0.125/NFS-joe samba
    29  mount -t smbfs -o usr=joe at mds.xyz //192.168.0.125/NFS-joe samba
    30  mount -t smbfs -o username=joe at mds.xyz //192.168.0.125/NFS-joe samba
    31  mount -V
    32  mount --version
    33  mount -v
    34  mount -t smbfs -o username=joe at mds.xyz //192.168.0.125/NFS-joe samba
    35  mount_smbfs //joe at mds.xyz:<JOESPASS>@192.168.0.125/NFS-joe samba
    36  mount_smbfs //joe at mds.xyz:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    37  ping 192.168.0.125
    38  mount_smbfs //joe at mds.xyz:"<JOESPASS>"@192.168.0.125/joe at mds.xyz 
samba
    39  mount_smbfs //"joe at mds.xyz":"<JOESPASS>"@192.168.0.125/NFS-joe samba
    40  mount_smbfs //joe:abc"@192.168.0.125/NFS-joe samba
    41  mount_smbfs //joe:abc at 192.168.0.125/NFS-joe samba
    42  mount_smbfs //joe\@mds.xyz:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    43  mount_smbfs //joe'@'mds.xyz:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    44  mount_smbfs //mds.xyz\joe:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    45  mount_smbfs //mds.xyz\joe at 192.168.0.125/NFS-joe samba
    46  mount_smbfs //mds.xyz\joe at 192.168.0.125/NFS-joe samba
    47  mount_smbfs //mds.xyz;joe:@192.168.0.125/NFS-joe samba
    48  mount_smbfs //mds.xyz;joe:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    49  mount_smbfs smb://mds.xyz;joe:"<JOESPASS>"@192.168.0.125/NFS-joe 
samba
    50  mount_smbfs //joe:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    51  mount_smbfs //joe at mds.xyz:"<JOESPASS>"@192.168.0.125/NFS-joe samba
    52  mount_smbfs //joe%40mds.xyz:"<JOESPASS>"@192.168.0.125/NFS-joe samba





-- 
Thx,
TK.



More information about the samba mailing list