Bug 231656 - /etc/nsmb.conf requires workgroup and user names to be UPPERCASE, while mount_smbfs not.
Summary: /etc/nsmb.conf requires workgroup and user names to be UPPERCASE, while mount...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL: https://reviews.freebsd.org/D22289
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-09-24 09:20 UTC by Gleb Popov
Modified: 2019-12-03 04:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov freebsd_committer 2018-09-24 09:20:58 UTC
When I run

mount_smbfs -I 172.16.34.25 //user@host/Cloud /mnt

it prompts me to enter a password and then successfully mounts the share.

However, putting

[host:user]
password=123123

into /etc/nsmb.conf and then running

mount_smbfs -N -I 172.16.34.25 //user@host/Cloud /mnt

doesn't work due to failing authentication.

I've sniffed packets and it turned out that mount_smbfs sends different hashes used to authenticate. After a bit of googling I found advice to write all SMB resource names in uppercase and it worked. After changing nsmb.conf contents to

[HOST:USER]
password=123123

the command with -N finally worked out.

Is it a bug, or I'm just misundestanding something?
Comment 1 Yuri Pankov freebsd_committer 2018-11-17 08:00:40 UTC
/etc/nsmb.conf actually mentions the requirement, nsmb.conf(5) doesn't though:

...
# SMB library uses next forms of section names (please note that the section
# name should be in upper case when it refers to server, user or share):
...
Comment 2 Gleb Popov freebsd_committer 2019-06-08 07:48:24 UTC
(In reply to Yuri Pankov from comment #1)

Even if man page had mentioned this behavior, I still think it is not enough visible for a user.

Can we just error out in mount_smbfs when config file has lowercase letters in section names?
Comment 3 Gleb Popov freebsd_committer 2019-12-03 04:53:50 UTC
Patch proposed here: https://reviews.freebsd.org/D22289