Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2026 19:11:00 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Lucas Rufkahr <luke@lukerufkahr.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mounting SMBv2 Share
Message-ID:  <20260518191100.439b389d.freebsd@edvax.de>
In-Reply-To: <20260518111503.7000f9aa@freebsd.vlg.garynet.org>
References:  <20260518100420.2c51b007@freebsd.vlg.garynet.org> <20260518111503.7000f9aa@freebsd.vlg.garynet.org>

index | next in thread | previous in thread | raw e-mail

On Mon, 18 May 2026 11:15:03 -0500, Lucas Rufkahr wrote:
> I've managed to get it done.
> 
> I added fusefs to kld_list in /etc/rc.conf
> I added myself to the operator group -- Not sure if this was needed
> I recompiled GVFS with FUSE support
> I then rebooted.
> 
> Thunar and gio now mount my share in $XDG_RUNTIME_DIR/gvfs


It should be possible with "on-board means" of FreeBSD, i. e.,
the support for older versions of CIFS/SMB is quite easy to
configure and use:

In /etc/nsmb.conf:

	[default]
	workgroup=YOUR_WORKGROUP_NAME		<- adjust this

	[SERVERNAME]
	addr=123.456.789.10			<- and this

	[SERVERNAME:USERNAME]			<- those
	password=TOPSECRET			<- and that

where SERVERNAME and USERNAME correspond to the server's name
and the username you use to access the share (with the proper
password). If no password is provided, mount will ask for it.

See "man nsmb.conf" for details.

Integrate it in /etc/fstab:

	//USERNAME@SERVERNAME/SHARENAME  /smb/share  smbfs  rw,noauto  0  0

Add "drive letters" ("//blah.../c$") if absolutely needed.
Leave out "noauto" if you want the system to mount the share
at startup. If not, mount it like any normal filesystem
interactively:

	# mount /smb/share

You can add further options if you like, like "ro" for write protection
and "noexec" to prevent execution.

If you use this as a non-root user, make sure you have /etc/sysctl.conf
to include

	vfs.usermount=1

and your user is in the "operator" group. Also the user needs to own
the mount target directory, but you can achive this if you put it
in yout $HOME, for example, /home/YOURNAME/smb/blah, and adjust the
fstab entry accordingly.

Make sure to check the FreeBSD Handbook chapter about SMB / CIFS and
its integration. There's also a corresponding FAQ section.

This approach makes it much more transparent to you what actually
happens, gives you better control of mount targets and options, and
will enable you to easily use any program you want.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20260518191100.439b389d.freebsd>