Mounting SMBv2 Share

0 views
Skip to first unread message

Lucas Rufkahr

unread,
May 18, 2026, 11:05:11 AM (10 days ago) May 18
to freebsd-...@freebsd.org
I am pulling my hair out trying to figure out how to mount this share
to a folder I can view in my terminal.

So far I've tried using the gio command. I want to use gio and GVFS
because its what Thunar uses.

I can get it to "mount" but its not making a folder anywhere and its
only visible within Thunar.

Marco Moock

unread,
May 18, 2026, 11:09:40 AM (10 days ago) May 18
to ques...@freebsd.org
Am 18.05.26 um 17:04 schrieb Lucas Rufkahr:
> I am pulling my hair out trying to figure out how to mount this share
> to a folder I can view in my terminal.

Which command do you use?

SMBv2 is outdated, so maybe you need to pass special mount options.

--
Gruß
Marco
Muell und Spam bitte an abfalle...@stinkedores.dorfdsl.de
OpenPGP_0x559E1A331A46B463.asc
OpenPGP_signature.asc

Lucas Rufkahr

unread,
May 18, 2026, 11:16:25 AM (10 days ago) May 18
to Marco Moock, ques...@freebsd.org
On Mon, 18 May 2026 17:08:58 +0200
Marco Moock <m...@dorfdsl.de> wrote:

> Am 18.05.26 um 17:04 schrieb Lucas Rufkahr:
> > I am pulling my hair out trying to figure out how to mount this
> > share to a folder I can view in my terminal.
>
> Which command do you use?
>
> SMBv2 is outdated, so maybe you need to pass special mount options.
>

The command I am using the mount is
gio mount smb://IP/share

$ gio mount smb://192.168.1.10/data
Authentication Required
Enter user and password for share “data” on “192.168.1.10”:
User [lucasrufkahr]: samba
Domain [WORKGROUP]:
Password:
$ mount
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid,
nfsv4acls) zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid,
nfsv4acls) zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid,
nfsv4acls) zroot/var/crash on /var/crash (zfs, local, noatime, noexec,
nosuid, nfsv4acls) zroot/tmp on /tmp (zfs, local, noatime, nosuid,
nfsv4acls) zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/home/XXX on /home/XXX (zfs, local, noatime,
nfsv4acls) zroot/home/lucasrufkahr on /home/lucasrufkahr (zfs, local,
noatime, nfsv4acls) /dev/da0s1 on /media/MEDIA (msdosfs, local)
$

As you can see, it is nowhere to be found


Marco Moock

unread,
May 18, 2026, 11:18:58 AM (10 days ago) May 18
to ques...@freebsd.org
Am 18.05.26 um 17:15 schrieb Lucas Rufkahr:
> The command I am using the mount is
> gio mount smb://IP/share

Have you tried to use the mount command?

https://man.freebsd.org/cgi/man.cgi?query=mount_smbfs&sektion=8&apropos=0&manpath=FreeBSD+15.0-RELEASE+and+Ports.quarterly
OpenPGP_0x559E1A331A46B463.asc
OpenPGP_signature.asc

Mathias M.

unread,
May 18, 2026, 11:20:48 AM (10 days ago) May 18
to freebsd-...@freebsd.org
Don't worry. If it is visible in Thunar, it's mounted.
It's probably somewhere under $XDG_RUNTIME_DIR/gvfs

Regards,
Mathias
--
Never trust an operating system you don't have sources for.
signature.asc

Lucas Rufkahr

unread,
May 18, 2026, 11:21:35 AM (10 days ago) May 18
to Marco Moock, ques...@freebsd.org
On Mon, 18 May 2026 17:18:29 +0200
Marco Moock <m...@dorfdsl.de> wrote:

> Am 18.05.26 um 17:15 schrieb Lucas Rufkahr:
> > The command I am using the mount is
> > gio mount smb://IP/share
>
> Have you tried to use the mount command?
>
> https://man.freebsd.org/cgi/man.cgi?query=mount_smbfs&sektion=8&apropos=0&manpath=FreeBSD+15.0-RELEASE+and+Ports.quarterly
>


STANDARDS
mount_smbfs offers support for SMB/CIFS/SMB1. It does
not support newer versions of the protocol like SMB2
and SMB3. SMB2 and SMB3 are supported by software available in the
ports(7) collection.

Mathias M.

unread,
May 18, 2026, 11:23:30 AM (10 days ago) May 18
to freebsd-...@freebsd.org, ques...@freebsd.org
What happens when you just type 'smb://192.168.1.10' into Thunar's
location bar?
That way it should mount it under your XDG_RUNTIME_DIR.

Regards,
Mathias
--
To the landlord belongs the doorknobs.
signature.asc

Lucas Rufkahr

unread,
May 18, 2026, 11:25:07 AM (10 days ago) May 18
to Mathias M., freebsd-...@freebsd.org
On Mon, 18 May 2026 17:20:03 +0200
"Mathias M." <m...@darktemple.ch> wrote:

> On Mon, May 18, 2026 at 10:04:20AM -0500, Lucas Rufkahr wrote:
> > I am pulling my hair out trying to figure out how to mount this
> > share to a folder I can view in my terminal.
> >
> > So far I've tried using the gio command. I want to use gio and GVFS
> > because its what Thunar uses.
> >
> > I can get it to "mount" but its not making a folder anywhere and its
> > only visible within Thunar.
> >
>
> Don't worry. If it is visible in Thunar, it's mounted.
> It's probably somewhere under $XDG_RUNTIME_DIR/gvfs
>
> Regards,
> Mathias

I insist, its not making the folder as you can see from the output of
mount and also:

$ cd $XDG_RUNTIME_DIR/gvfs
cd: /var/run/user/1001/gvfs: No such file or directory
$

Marco Moock

unread,
May 18, 2026, 11:32:53 AM (10 days ago) May 18
to ques...@freebsd.org
Am 18.05.26 um 17:20 schrieb Lucas Rufkahr:
That's bad.

I've found
https://www.freshports.org/filesystems/smbnetfs/

But that uses FUSE and not the mount command.
OpenPGP_0x559E1A331A46B463.asc
OpenPGP_signature.asc

Lucas Rufkahr

unread,
May 18, 2026, 12:15:54 PM (10 days ago) May 18
to freebsd-...@freebsd.org
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


Polytropon

unread,
May 18, 2026, 1:11:44 PM (10 days ago) May 18
to Lucas Rufkahr, freebsd-...@freebsd.org
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, ...

Reply all
Reply to author
Forward
0 new messages