Score:1

Connecting from windows to debian Samba share

mx flag

I have a proxmox installation with a few ZFS shares. The shares are created using

zfs create storage/photos
sudo zfs set acltype=posixacl storage/photos

The user is created using

sudo adduser --system --no-create-home samba-peter
sudo smbpasswd -a samba-peter
sudo setfacl -R -m "u:samba-peter:rwx" /storage/photos

then I add

[photos]
   comment = photos
   path = /storage/photos
   read only = no
   writable = yes
   browseable = yes
   guest ok = no
   valid users = @samba-peter

to /etc/samba/smb.conf and increase logging using log level = 2 winbind:5.

Now when I try to connect using Windows 10 21H2 19044.2604 it logs

==> /var/log/samba/log.smbd <==
[2023/03/06 17:22:10.679844,  2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE

==> /var/log/samba/log.192.168.0.19 <==
[2023/03/06 17:22:10.685627,  2] ../../source3/auth/auth.c:323(auth_check_ntlm_password)
  check_ntlm_password:  authentication for user [samba-peter] -> [samba-peter] -> [samba-peter] succeeded
[2023/03/06 17:22:10.686016,  2] ../../source3/param/loadparm.c:2864(lp_do_section)
  Processing section "[photos]"

==> /var/log/samba/log.fryr <==
[2023/03/06 17:22:10.689318,  1] ../../source3/smbd/service.c:362(create_connection_session_info)
  create_connection_session_info: user 'samba-peter' (from session setup) not permitted to access this share (photos)
[2023/03/06 17:22:10.689346,  1] ../../source3/smbd/service.c:543(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

It seems that the authentication succeeds (if I login using the wrong password the log states that the password was incorrect). But access to the directory fails, but what am I missing I gave it access using setfacl -R -m "u:samba-peter:rwx" /storage/photos

Samba version: Version 4.13.13-Debian
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.15.85-1-pve ZFS Version: zfs-2.1.9-pve1, zfs-kmod-2.1.9-pve1

mx flag
I even tried to set samba-peter as owner of `/storage/photos` using `sudo chown -R samba-peter /storage/photos` sadly that didn't help.
Score:1
tz flag

valid users = @samba-peter specifies that users belonging to the group samba-peter are allowed. Either drop the @ or make sure that peter belongs to the group samba-peter

Rowland Penny avatar
ba flag
You are setting the permissions with setfacl, are you using 'vfs objects = acl_xattr' in the '[global]' part of your smb.conf ?
mx flag
Thanks i will give it a try ( i know for a fact that the user has no group)
mx flag
@Tschösi thanks that did it!!!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.