smbclient ignores included config files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba |
Unknown
|
Unknown
|
|||
samba (Ubuntu) |
Incomplete
|
Low
|
Unassigned |
Bug Description
Hi, since upgrading to Ubuntu 20.04 I cannot gio mount or otherwise connect to my companies' samba shares due to them requiring the NT1 protocol. Adding client min protocol = NT1 to ~/.smb/smb.conf works, but I need to deploy this to a largish number of managed machines. The file /etc/samba/smb.conf on these machines looks like this:
include = /usr/share/
include = /usr/share/
include = /etc/samba/
where /usr/share/
Unfortunately adding client min protocol = NT1 only works in the first included file but not the second where we really need this to go. It seems that there is a bug in the included config file parser somewhere.
ubuntu-bug requested me to include this information though I'm not sure how relevant it is:
seb@eragon:
Enter WORKGROUP\seb's password:
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
Home Disk /home on eragon
IPC$ IPC IPC Service (eragon server (Samba, Ubuntu))
Reconnecting with SMB1 for workgroup listing.
smbXcli_
protocol negotiation failed: NT_STATUS_
Unable to connect with SMB1 -- no workgroup available
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: smbclient 2:4.11.
ProcVersionSign
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.8
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Wed Sep 2 19:24:03 2020
EcryptfsInUse: Yes
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_NZ.UTF-8
SHELL=/bin/bash
SambaClientRegr
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: server-next |
Hi Sebastien and thanks for this bug report. The smb.conf(5) manpage says about "include" lines:
This allows you to include one config file inside another.
The file is included literally, as though typed in place.
so it would be interesting to see replacing those includes with the actual, literal file contents causes any change in behavior. If it does it's a good indicator of a bug in the include mechanism, and we should probably follow-up upstream. If it does not, then we'll need to dig in a different direction.
Is it only the "client min protocol = NT1" setting that gets ignored in the second included file, or is it all of it?
I'm marking this report to Incomplete for the moment, please change its status back to New after commenting back with your findings, and we'll look at it again. Thanks!