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 // -U guest -N

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

1 Like

Another method:

gio mount smb://user@host/share

I added this to /etc/fstab

//    /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.


If I do sudo mount -o user=guest,password="" // /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.


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 * \\\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