I've spent years installing the full samba package on desktops, just to get a /etc/samba/smb.conf file that I can configure, but for many years now, Debian and Ubuntu have both had a pre-installed SMB client for gnome. Right now I can install a new copy of Debian, and immediately browse my network, but when I set my NAS to disable SMB1 (min protocol SMB2), I can no longer connect to it from that system (though I can from mint19 or windows or ubuntu with full samba package or cifs-utils).

I believe the built-in client comes from GVFS through the gvfs-backends library. I've just never figured out how to configure it. Or can it be configured?

I'm looking to do simple things like set the workgroup name, or wins server address, or SMB protocol versioning, or authentication protocols, etc.

How can I configure SMB client properties on a brand new vanilla copy of Debian Stretch without installing samba or smbclient?

  • So are you unable to browse the network or are you unable to connect to the server? Those are completely different things in SMB. – user1686 Jun 1 '19 at 19:12
  • I am able to browse the network. but I cannot retrieve the share list from a server where SMB1 has been disabled. I was able to resolve the issue by installing samba and setting client min protocol = SMB2, but I'd like to learn to configure the builtin gvfs client, rather than installing a server package just to set one client setting. – Frank Thomas Jun 1 '19 at 21:41

The built-in GNOME SMB client is part of GVfs and is built on top of libsmbclient. It picks up default configuration from the same /etc/samba/smb.conf as smbclient command-line tool.

You don't need to install any package to use this file – you can create it with a text editor of your choice, and with sudo mkdir /etc/samba if needed. (The documentation is available online, and you don't need to include all the default settings – just the ones you actually want to change.)

Note that the workgroup name is only used within the NetBIOS-based "network browsing" (nmbd), and has absolutely no meaning within the actual SMB file sharing connections (smbd).

(For that matter, SMBv2+ is fully separate from NetBIOS. Windows systems will even refuse to speak NetBIOS if SMBv1 is disabled, and will not participate in NetBIOS-based workgroup browsing.)

  • Thank you, that does explain a number of the nuances I've noticed while working through this, this time around. I'd like to do an experiment before accepting, but it sounds quite promising. I had not expected anything would read the conf file if I just created it by hand. – Frank Thomas Jun 2 '19 at 7:41
  • libsmbclient is the ticket. The configuration behavior is documented here: samba.org/samba/docs/current/man-html/libsmbclient.7.html Thanks again! – Frank Thomas Jun 2 '19 at 7:47
  • 1
    @FrankThomas, please also note that to get the "stock" /etc/samba/smb.conf you only have to install the samba-common package—see for yourself. – kostix Jun 2 '19 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.