Smbclient works but how to mount as user?

As normal user (at a Silverblue-34 machine, connecting to a guest only rw samba share in Fedora-34), smbclient works: (can create new folder)
smbclient //192.168.102.11/Share -U guest -N

How, as a normal user, to do a mount -o ... //192.168.102.11/Share ~/smb ?

1 Like

Another method:

gio mount smb://user@host/share
2 Likes

I added this to /etc/fstab

//192.168.102.11/Share    /mnt/smm    cifs    user,user=guest,password="",nofail 0 0

When doing as user, mount /mnt/smb, I got

This program is not installed setuid root -  "user" CIFS mounts not supported.
1 Like

Seems like an intentional restriction for security reasons.
I guess that sudo/sudoers is the expected way of privilege elevation.
Using x-systemd.automount should provide another workaround.

3 Likes

If I do sudo mount -o user=guest,password="" //192.168.102.11/Share /mnt/smb as user, then the mount is OK. But when doing mkdir /mnt/smb/newfolder got

mkdir: cannot create directory `/mnt/smb/newfolder`: Permission denied
1 Like

Ownership for the target filesystem is typically specified with:

I thought samba is a solved problem, I am too naive.

2 Likes

The real fun begins when you integrate Samba into a domain. :grin:

Based on this Fedora 32: Simple Local File-Sharing with Samba - Fedora Magazine

At least from Windows 10 clients, net use * \\192.168.102.11\public /user:samba_test_user works with readwrite .

So it is more complicated when using Fedora as samba client as there is an extra security layer of Linux user permissions when using mount -t cifs .

1 Like

Lol…